From 8e0b13c159db275b2cbc521ded9dfd5d6855a2d5 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 9 Mar 2024 10:53:42 -0600 Subject: posts: changed some urls and build script --- app/posts/build.py | 4 ++++ app/posts/models.py | 3 +-- app/posts/urls/range_urls.py | 4 ++-- app/posts/views/essay_views.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'app/posts') diff --git a/app/posts/build.py b/app/posts/build.py index 23d67d5..fdfcd1a 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -118,6 +118,10 @@ class BuildEssays(BuildNew): return self.model.objects.filter(post_type=PostType.ESSAY).filter(status__exact=1).order_by('-pub_date') def build(self): + self.build_list_view( + base_path=reverse("range:list"), + paginate_by=50 + ) self.build_list_view( base_path=reverse("essay-list:list"), paginate_by=50 diff --git a/app/posts/models.py b/app/posts/models.py index 7870b35..11ad509 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -73,7 +73,6 @@ class PostType(models.IntegerChoices): SRC = 3, ('src') JRNL = 4, ('jrnl') FIELD_NOTE = 5, ('field note') - GUIDE = 6, ('guide') FILM = 7, ('film') @@ -187,7 +186,7 @@ class Post(models.Model): @property def sitemap_priority(self): - if self.post_type in [2,4,5]: + if self.post_type in [2,3,4]: return 1.0 else: return 0.7 diff --git a/app/posts/urls/range_urls.py b/app/posts/urls/range_urls.py index e035a25..57d72a7 100644 --- a/app/posts/urls/range_urls.py +++ b/app/posts/urls/range_urls.py @@ -15,11 +15,11 @@ urlpatterns = [ r'', views.RangeListView.as_view(), {'page':1}, - name="range-list" + name="list" ), path( r'', views.RangeListView.as_view(), - name="range-list" + name="list" ), ] diff --git a/app/posts/views/essay_views.py b/app/posts/views/essay_views.py index 3c28834..76a022c 100644 --- a/app/posts/views/essay_views.py +++ b/app/posts/views/essay_views.py @@ -66,7 +66,7 @@ class EssayDetailView(LuxDetailView): related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) context['related'] = related context['breadcrumbs'] = ('Range',) - context['crumb_url'] = reverse('range:range-list') + context['crumb_url'] = reverse('range:list') return context def get_template_names(self): -- cgit v1.2.3-70-g09d2