Files
main-site/config/urls.py
Mark e2f71a801c
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Failing after 14s
CI / pr-e2e (pull_request) Failing after 1m19s
Add category taxonomy and navigation integration
Implements Issue #35 with category snippets, article category routing, category-aware templates, and category RSS feeds with tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-03 11:20:07 +00:00

30 lines
1.3 KiB
Python

from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.generic import RedirectView
from wagtail import urls as wagtail_urls
from wagtail.contrib.sitemaps.views import sitemap
from apps.blog.feeds import AllArticlesFeed, CategoryArticlesFeed, TagArticlesFeed
from apps.core.views import consent_view, robots_txt
urlpatterns = [
path("django-admin/", admin.site.urls),
path("cms/", include("wagtail.admin.urls")),
path("documents/", include("wagtail.documents.urls")),
path("comments/", include("apps.comments.urls")),
path("newsletter/", include("apps.newsletter.urls")),
path("consent/", consent_view, name="consent"),
path("robots.txt", robots_txt, name="robots_txt"),
path("feed/", AllArticlesFeed(), name="rss_feed"),
path("feed/category/<slug:category_slug>/", CategoryArticlesFeed(), name="rss_feed_by_category"),
path("feed/tag/<slug:tag_slug>/", TagArticlesFeed(), name="rss_feed_by_tag"),
path("sitemap.xml", sitemap),
path("admin/", RedirectView.as_view(url="/cms/", permanent=False)),
path("", include(wagtail_urls)),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)