From a08bda7e08de6f510748fa094fb55bbbdb673c12 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 29 Feb 2024 19:31:11 -0600 Subject: range: added craft urls and views --- app/posts/models.py | 2 ++ app/posts/templates/posts/howto_list.html | 22 ++++++++++++ app/posts/templates/posts/review_list.html | 2 +- app/posts/urls/craft_urls.py | 29 +++++++++++++++ app/posts/urls/guide_urls_old.py | 29 --------------- app/posts/views/craft_views.py | 57 ++++++++++++++++++++++++++++++ 6 files changed, 111 insertions(+), 30 deletions(-) create mode 100644 app/posts/templates/posts/howto_list.html create mode 100644 app/posts/urls/craft_urls.py delete mode 100644 app/posts/urls/guide_urls_old.py create mode 100644 app/posts/views/craft_views.py (limited to 'app') diff --git a/app/posts/models.py b/app/posts/models.py index cf7212b..2ce7d96 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -140,6 +140,8 @@ class Post(models.Model): 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.HOWTO: + return reverse('craft:craft-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/howto_list.html b/app/posts/templates/posts/howto_list.html new file mode 100644 index 0000000..13b87c3 --- /dev/null +++ b/app/posts/templates/posts/howto_list.html @@ -0,0 +1,22 @@ +{% extends 'base.html' %} +{% 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 breadcrumbs %}{% if breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{%endif%}{% endblock %} +{% block primary %}
+
+

Craft

+

It's not just what you do, but how you do it that creates the world around you. +

+
+ +
+{%endblock%} diff --git a/app/posts/templates/posts/review_list.html b/app/posts/templates/posts/review_list.html index 5dcaa72..6c54f18 100644 --- a/app/posts/templates/posts/review_list.html +++ b/app/posts/templates/posts/review_list.html @@ -6,7 +6,7 @@ {% block primary %}

Tools

-

At some point the wrench must be turned, the shutter clicked, the paper scratched. The right tool makes all the difference. In decades of testing, these are the best I've used.

+

I am fascinated by artifacts, stuff, the things we populate our lives with. I've chosen to call them tools, but they're more than that aren't they?