From 048ffbf8cc09a99f7ec5152f4d83a531d56285bc Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 6 May 2023 17:08:59 -0400 Subject: films: made list template and got started on detail --- app/posts/models.py | 2 +- app/posts/templates/posts/film_detail.html | 90 ++++++++++++++++++++---------- app/posts/templates/posts/film_list.html | 22 ++++++++ 3 files changed, 83 insertions(+), 31 deletions(-) (limited to 'app/posts') diff --git a/app/posts/models.py b/app/posts/models.py index 1dafa1a..1510820 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -105,7 +105,7 @@ class Post(models.Model): def get_absolute_url(self): if self.post_type == PostType.FILM: - return reverse('essays:detail', kwargs={"slug": self.slug}) + return reverse('film:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.ESSAY: return reverse('essays:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.RANGE: diff --git a/app/posts/templates/posts/film_detail.html b/app/posts/templates/posts/film_detail.html index 42d06a2..b088c56 100644 --- a/app/posts/templates/posts/film_detail.html +++ b/app/posts/templates/posts/film_detail.html @@ -1,15 +1,29 @@ {% 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 %} +{% load get_image_by_size %} +{%block htmlclass%}{%endblock%} +{% block sitename %} + + {{object.title|safe}} by Scott Gilbertson + {%endblock%} -{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %}{%block extrahead%} + {%block extrahead%} -{% if object.has_code %} {%endif %} {%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
+{%block bodyid%}id="home" class="friends"{%endblock%} +{% block breadcrumbs %} +{% endblock %} +{% block primary %} +

{{object.title|smartypants|safe}}

@@ -89,27 +103,43 @@ {% endfor %} {%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%} - + + {% with object.get_next_published as next %} + {% with object.get_previous_published as prev %} + {%endwith%}{%endwith%} + {% if object.related.all %}
+ +
{%endif%} +
{% endblock %} -{% block js %} - -{{ block.super }} -{%endblock%} diff --git a/app/posts/templates/posts/film_list.html b/app/posts/templates/posts/film_list.html index 7a68058..7107d47 100644 --- a/app/posts/templates/posts/film_list.html +++ b/app/posts/templates/posts/film_list.html @@ -2,6 +2,25 @@ {% load typogrify_tags %} {% block pagetitle %}Notes and Essays On Living - By Scott Gilbertson {% endblock %} {% block metadescription %}Essays and stories on self-reliance, DIY, repair, tools, birding, walking, living well, and other ephemera.{% endblock %} +{% block extrahead %} + +{% endblock%} {% block breadcrumbs %}{% if breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{%endif%}{% endblock %} {% block primary %}
@@ -11,6 +30,9 @@