From a0b95dc2dfb84c682bb8f677e5d471f84e5028fe Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 14 Nov 2018 13:17:42 -0600 Subject: wrote out basic notes skeleton --- apps/pages/views.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 apps/pages/views.py (limited to 'apps/pages/views.py') diff --git a/apps/pages/views.py b/apps/pages/views.py new file mode 100644 index 0000000..617ce04 --- /dev/null +++ b/apps/pages/views.py @@ -0,0 +1,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'] -- cgit v1.2.3-70-g09d2