diff options
author | luxagraf <sng@luxagraf.net> | 2018-11-14 13:17:42 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-11-14 13:17:42 -0600 |
commit | a0b95dc2dfb84c682bb8f677e5d471f84e5028fe (patch) | |
tree | 6dd1919856f736c5b644270d59b57e4bb20336c5 /apps/pages/views.py |
wrote out basic notes skeleton
Diffstat (limited to 'apps/pages/views.py')
-rw-r--r-- | apps/pages/views.py | 11 |
1 files changed, 11 insertions, 0 deletions
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'] |