From 074ec1e21a7bfa867bbb2c35057c19b5cfc375c4 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 17 Dec 2022 16:38:13 -0600 Subject: pages: got rid of site var in view template func --- app/pages/templates/pages/luxagraf/homepage.html | 95 ---------------------- .../templates/pages/luxagraf/page_detail.html | 37 --------- app/pages/templates/pages/luxagraf/page_detail.txt | 8 -- app/pages/templates/pages/page_detail.html | 37 +++++++++ app/pages/templates/pages/page_detail.txt | 8 ++ app/pages/views.py | 2 +- 6 files changed, 46 insertions(+), 141 deletions(-) delete mode 100644 app/pages/templates/pages/luxagraf/homepage.html delete mode 100644 app/pages/templates/pages/luxagraf/page_detail.html delete mode 100644 app/pages/templates/pages/luxagraf/page_detail.txt create mode 100644 app/pages/templates/pages/page_detail.html create mode 100644 app/pages/templates/pages/page_detail.txt diff --git a/app/pages/templates/pages/luxagraf/homepage.html b/app/pages/templates/pages/luxagraf/homepage.html deleted file mode 100644 index 7b67a7a..0000000 --- a/app/pages/templates/pages/luxagraf/homepage.html +++ /dev/null @@ -1,95 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% block sitename %} - - Libregraf Publishing. Fine books for fine people - {%endblock%} - - {%block extrahead%} - -{%endblock%} -{%block bodyid%}id="home" class="archive"{%endblock%} - -{% block primary %} -
-

The Wandren Code

-
- -
-
Browse the Archives
-
-{% endblock %} - -{% block js %}{% comment %} {% endcomment%}{% endblock%} diff --git a/app/pages/templates/pages/luxagraf/page_detail.html b/app/pages/templates/pages/luxagraf/page_detail.html deleted file mode 100644 index 4644386..0000000 --- a/app/pages/templates/pages/luxagraf/page_detail.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} -{% block pagetitle %}Luxagraf | {{object.title}}{% endblock %} -{% block metadescription %}{{object.meta_description}}{% endblock %} -{%block htmlclass%}class="detail"{%endblock%} -{%block bodyid%}id="{{object.title|slugify}}"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
-
-
-

{{object.title}}

- {%if object.sub_title %}

{{object.sub_title}}

{%endif%} -
-
- {{object.body_html|safe|smartypants|widont}} -
-
- {% if object.enable_comments %} -{% get_comment_count for object as comment_count %} -{%if comment_count > 0 %} -

{{comment_count}} Comment{{ comment_count|pluralize }}

-{% render_comment_list for object %} -{%endif%} -
-{% render_comment_form for object %} -
-{%endif%} -
-{% endblock %} -{% block js %} - - -{% endblock %} - - diff --git a/app/pages/templates/pages/luxagraf/page_detail.txt b/app/pages/templates/pages/luxagraf/page_detail.txt deleted file mode 100644 index 547ce79..0000000 --- a/app/pages/templates/pages/luxagraf/page_detail.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{object.title|safe}} -{% for letter in object.title %}={%endfor%} - - by Scott Gilbertson - <{{SITE_URL}}{{object.get_absolute_url}}> - {{object.pub_date|date:"l, d F Y"}} - -{{object.body_markdown|safe}} diff --git a/app/pages/templates/pages/page_detail.html b/app/pages/templates/pages/page_detail.html new file mode 100644 index 0000000..4644386 --- /dev/null +++ b/app/pages/templates/pages/page_detail.html @@ -0,0 +1,37 @@ +{% extends 'base.html' %} +{% load typogrify_tags %} +{% load comments %} +{% block pagetitle %}Luxagraf | {{object.title}}{% endblock %} +{% block metadescription %}{{object.meta_description}}{% endblock %} +{%block htmlclass%}class="detail"{%endblock%} +{%block bodyid%}id="{{object.title|slugify}}"{%endblock%} +{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} +{% block primary %}
+
+
+

{{object.title}}

+ {%if object.sub_title %}

{{object.sub_title}}

{%endif%} +
+
+ {{object.body_html|safe|smartypants|widont}} +
+
+ {% if object.enable_comments %} +{% get_comment_count for object as comment_count %} +{%if comment_count > 0 %} +

{{comment_count}} Comment{{ comment_count|pluralize }}

+{% render_comment_list for object %} +{%endif%} +
+{% render_comment_form for object %} +
+{%endif%} +
+{% endblock %} +{% block js %} + + +{% endblock %} + + diff --git a/app/pages/templates/pages/page_detail.txt b/app/pages/templates/pages/page_detail.txt new file mode 100644 index 0000000..547ce79 --- /dev/null +++ b/app/pages/templates/pages/page_detail.txt @@ -0,0 +1,8 @@ +{{object.title|safe}} +{% for letter in object.title %}={%endfor%} + + by Scott Gilbertson + <{{SITE_URL}}{{object.get_absolute_url}}> + {{object.pub_date|date:"l, d F Y"}} + +{{object.body_markdown|safe}} diff --git a/app/pages/views.py b/app/pages/views.py index a4be450..5262806 100644 --- a/app/pages/views.py +++ b/app/pages/views.py @@ -10,7 +10,7 @@ class PageDetailView(LuxDetailView): def get_template_names(self): obj = self.get_object() - return ["pages/%s/%s.html" % (obj.site.name, obj.slug), 'pages/%s/page_detail.html'% obj.site.name] + return ["pages/%s.html" % (obj.slug), 'pages/page_detail.html'] class PageDetailTXTView(LuxDetailView): -- cgit v1.2.3-70-g09d2