views.py 295 Bytes
# -*- coding: utf-8 -*-
from django.shortcuts import get_object_or_404
from common.decorators import render
from common.models import FlatPage


@render(template='flat_page.html')
def flat_page(request, text_id):
    page = get_object_or_404(FlatPage, text_id=text_id)
    return {'page': page}