From 6f3d1ac2665ba178c61b6876597aac4e1188fcdb Mon Sep 17 00:00:00 2001 From: sarahframe Date: Tue, 27 Aug 2024 10:24:43 +1200 Subject: [PATCH 1/2] make updates/rss work and remove blog/rss --- cdhweb/blog/urls.py | 9 --------- cdhweb/urls.py | 4 +++- 2 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 cdhweb/blog/urls.py diff --git a/cdhweb/blog/urls.py b/cdhweb/blog/urls.py deleted file mode 100644 index ed500769..00000000 --- a/cdhweb/blog/urls.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "blog" -urlpatterns = [ - path("rss/", views.RssBlogPostFeed(), name="rss"), - path("atom/", views.AtomBlogPostFeed(), name="atom"), -] diff --git a/cdhweb/urls.py b/cdhweb/urls.py index 9d0eedf4..9d653dda 100644 --- a/cdhweb/urls.py +++ b/cdhweb/urls.py @@ -15,7 +15,7 @@ from cdhweb.context_processors import favicon_path from cdhweb.pages.views import OpenSearchDescriptionView, SiteSearchView from cdhweb.events.views import EventIcalView -from cdhweb.blog.views import BlogPostRedirectView +from cdhweb.blog.views import BlogPostRedirectView, RssBlogPostFeed, AtomBlogPostFeed admin.autodiscover() @@ -70,6 +70,8 @@ # wagtail paths path("cms/", include(wagtailadmin_urls)), path("documents/", include(wagtaildocs_urls)), + path("updates/rss/", RssBlogPostFeed(), name="rss"), + path("updates/atom/", AtomBlogPostFeed(), name="atom"), re_path(r"updates/(?P\d{4})/(?P\d{2})/(?P\d{2})/(?P[\w-]+)", BlogPostRedirectView.as_view(), name='blog-detail'), path("updates//", BlogPostRedirectView.as_view(), name='blog-detail'), ] From c723b44fea5b9b35a2f75b817aab1e2129e14624 Mon Sep 17 00:00:00 2001 From: sarahframe Date: Tue, 27 Aug 2024 10:43:49 +1200 Subject: [PATCH 2/2] remove blog.urls from urls.py --- cdhweb/urls.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cdhweb/urls.py b/cdhweb/urls.py index 9d653dda..c89f5222 100644 --- a/cdhweb/urls.py +++ b/cdhweb/urls.py @@ -41,7 +41,6 @@ path("_500/", lambda _: 1 / 0), # for testing 500 error page # main apps path("people/", include("cdhweb.people.urls", namespace="people")), - path("blog/", include("cdhweb.blog.urls", namespace="blog")), path("projects/", include("cdhweb.projects.urls", namespace="projects")), # search path("search/", SiteSearchView.as_view(), name="search"),