From b5db26426d58b6394c8a2b15aacabd3c9e883807 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 29 Feb 2024 13:31:37 -0600 Subject: range: added review template --- app/posts/models.py | 2 + app/posts/templates/posts/review_detail.html | 115 +++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 app/posts/templates/posts/review_detail.html diff --git a/app/posts/models.py b/app/posts/models.py index 2726949..cf7212b 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -138,6 +138,8 @@ class Post(models.Model): return reverse('essays:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.SRC: return reverse('src:detail', kwargs={"slug": self.slug}) + if self.post_type == PostType.REVIEW: + return reverse('reviews:review-detail', kwargs={"slug": self.slug}) if self.post_type == PostType.FIELD_NOTE: return reverse('fieldnote:detail', kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) if self.post_type == PostType.GUIDE: diff --git a/app/posts/templates/posts/review_detail.html b/app/posts/templates/posts/review_detail.html new file mode 100644 index 0000000..7380c7e --- /dev/null +++ b/app/posts/templates/posts/review_detail.html @@ -0,0 +1,115 @@ +{% extends 'base.html' %} +{% load typogrify_tags %} +{% load comments %} +{%block htmlclass%}class="detail single"{%endblock%} +{% block pagetitle %}{{object.title|title|smartypants|safe}} - by Scott Gilbertson{% endblock %} + +{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %}{%block extrahead%} + +{% if object.has_code %} {%endif %} +{%endblock%} +{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} +{% block primary %}
+
+
+

{{object.title|smartypants|safe}}

+ {% if object.subtitle %}

{{object.subtitle|smartypants|safe}}

{%endif%} + +
+
+ {% if object.prologue_html %}
+ {{object.prologue_html|smartypants|safe}} +

{%endif%} + {{object.body_html|safe|smartypants}} + {% if object.epilogue_html %}
+ {{object.epilogue_html|smartypants|safe}} +
{%endif%} +
+ {%if wildlife or object.field_notes.all or object.books.all %}{%endif%} +
+
+ {% if object.related.all %}
+ +
{%endif%} + {% comment %}
+
If you enjoyed this, you should join the mailing list…
+ {% include 'mailing_list.html' %} +
{% endcomment %} + {% 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 %} +
+{% else %} +

Sorry, comments have been disabled for this post.

+
+{%endif%} + +{% endblock %} +{% block js %} + +{{ block.super }} +{%endblock%} -- cgit v1.2.3-70-g09d2