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..c89f5222 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() @@ -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"), @@ -70,6 +69,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'), ]