summaryrefslogtreecommitdiff
path: root/app/pages/views.py
blob: cccc4fb26c9252ca338de38878835e32e5b692c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from django.views.generic.detail import DetailView

from pages.models import Page


class PageDetailView(DetailView):
    model = Page
    slug_field = "slug"

    def get_template_names(self):
        obj = self.get_object()
        return ["details/%s.html" % obj.slug, 'details/page.html']