diff options
Diffstat (limited to 'app/pages')
-rw-r--r-- | app/pages/build.py | 8 | ||||
-rw-r--r-- | app/pages/models.py | 2 | ||||
-rw-r--r-- | app/pages/views.py | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/app/pages/build.py b/app/pages/build.py index b1bd53d..2309983 100644 --- a/app/pages/build.py +++ b/app/pages/build.py @@ -11,14 +11,6 @@ class BuildPages(BuildNew): self.build_detail_view() print("building pages") - ''' - def build_essays(self): - qs = self.model.objects.filter(path="essays", build=True) - c = {'object_list': qs, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL} - t = render_to_string('archives/essays.html', c).encode('utf-8') - self.write_file('essays/', t) - ''' - def get_model_queryset(self): return self.model.objects.filter(build=True) diff --git a/app/pages/models.py b/app/pages/models.py index 76f7d1d..5e9cd5b 100644 --- a/app/pages/models.py +++ b/app/pages/models.py @@ -39,4 +39,4 @@ class PageSitemap(Sitemap): protocol = "https" def items(self): - return Page.objects.all() + return Page.objects.filter(build=True) diff --git a/app/pages/views.py b/app/pages/views.py index bef6529..167ad01 100644 --- a/app/pages/views.py +++ b/app/pages/views.py @@ -10,6 +10,8 @@ class PageDetailView(LuxDetailView): obj = self.get_object() return ["pages/%s.html" % obj.slug, 'pages/page_detail.html'] + class PageDetailTXTView(LuxDetailView): model = Page slug_field = "slug" + template_name = "pages/page_detail.txt" |