From 4b3f15e68a5601c350cc605794eea20050e863fa Mon Sep 17 00:00:00 2001 From: lxf Date: Sun, 20 Dec 2020 13:52:56 -0500 Subject: fixed some things with guides --- app/posts/build.py | 2 +- app/posts/models.py | 1 + config/base_urls.py | 7 ++++++- design/templates/base.html | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/posts/build.py b/app/posts/build.py index 7bd191a..9a7e2c1 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -117,7 +117,7 @@ class BuildEssays(BuildNew): def build(self): self.build_list_view( - base_path=reverse("essays:list"), + base_path=reverse("essay-list:list"), paginate_by=50 ) self.build_detail_view() diff --git a/app/posts/models.py b/app/posts/models.py index 159060e..302d278 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -44,6 +44,7 @@ class PostType(models.IntegerChoices): SRC = 3, ('src') JRNL = 4, ('jrnl') FIELD_NOTE = 5, ('field note') + GUIDE = 6, ('guide') class Post(models.Model): diff --git a/config/base_urls.py b/config/base_urls.py index e3cfa78..2260016 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -48,7 +48,12 @@ urlpatterns = [ path(r'locations/', include('locations.urls')), #path(r'expenses/', include('expenses.urls', namespace='expenses')), path(r'photos/', include('media.urls')), - path(r'guide/', include('posts.urls.guide_urls', namespace='guide')), + path(r'review/', include('posts.urls.review_urls')), + re_path(r'^review/$', RedirectView.as_view(url='/reviews/')), + path(r'reviews/', include('posts.urls.review_urls', namespace='review-list')), + path(r'guide/', include('posts.urls.guide_urls')), + re_path(r'^guide/$', RedirectView.as_view(url='/guides/')), + path(r'guides/', include('posts.urls.guide_urls', namespace='guide-list')), path(r'essay/', include('posts.urls.essay_urls')), re_path(r'^essay/$', RedirectView.as_view(url='/essays/')), path(r'essays/', include('posts.urls.essay_urls', namespace='essay-list')), diff --git a/design/templates/base.html b/design/templates/base.html index 7ed88c2..06313ea 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -33,7 +33,7 @@