summaryrefslogtreecommitdiff
path: root/app/pages
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-11-13 22:11:28 -0500
committerluxagraf <sng@luxagraf.net>2020-11-13 22:11:28 -0500
commitb2434dcba142961b4a4b67780cf64e01d0908bf5 (patch)
treea9d91844efe30952177c28e329f9f652517dfbe3 /app/pages
parent2f9701b600493f1172c15447ba5ce4f363b49136 (diff)
migrated jrnl to posts, fixed some bugs in pages build, RSS feed, and
Sitemap
Diffstat (limited to 'app/pages')
-rw-r--r--app/pages/build.py8
-rw-r--r--app/pages/models.py2
-rw-r--r--app/pages/views.py2
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"