Skip to content

Commit

Permalink
Remove old project urls from main url config
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Sep 6, 2024
1 parent 7d410d0 commit d1c7720
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cdhweb/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from wagtail.documents import urls as wagtaildocs_urls
from wagtailautocomplete.urls.admin import urlpatterns as autocomplete_admin_urls

from cdhweb.blog.views import AtomBlogPostFeed, BlogPostRedirectView, RssBlogPostFeed
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, RssBlogPostFeed, AtomBlogPostFeed
from cdhweb.pages.views import OpenSearchDescriptionView, SiteSearchView

admin.autodiscover()

Expand All @@ -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("projects/", include("cdhweb.projects.urls", namespace="projects")),
# search
path("search/", SiteSearchView.as_view(), name="search"),
path(
Expand Down Expand Up @@ -71,8 +70,12 @@
path("documents/", include(wagtaildocs_urls)),
path("updates/rss/", RssBlogPostFeed(), name="rss"),
path("updates/atom/", AtomBlogPostFeed(), name="atom"),
re_path(r"updates/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w-]+)", BlogPostRedirectView.as_view(), name='blog-detail'),
path("updates/<slug>/", BlogPostRedirectView.as_view(), name='blog-detail'),
re_path(
r"updates/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w-]+)",
BlogPostRedirectView.as_view(),
name="blog-detail",
),
path("updates/<slug>/", BlogPostRedirectView.as_view(), name="blog-detail"),
]

if settings.DEBUG:
Expand Down

0 comments on commit d1c7720

Please sign in to comment.