aboutsummaryrefslogtreecommitdiff
path: root/apps/pages/views.py
blob: 617ce0424d5548c63ae001254e631f1bb1b667ca (plain)
1
2
3
4
5
6
7
8
9
10
11
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 ["pages/%s.html" % obj.slug, 'pages/page.html']