Add redirect view for old pages listing

This commit is contained in:
Jake Howard 2024-02-17 19:44:45 +00:00
parent a19964199f
commit ec609ae562
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 7 additions and 0 deletions

View file

@ -10,4 +10,5 @@ urlpatterns = [
path("tags/<slug:slug>/", views.TagView.as_view()),
path("tags/", views.TagsView.as_view()),
path("categories/", views.TagsView.as_view()),
path("index.json", views.PageLinksView.as_view()),
]

View file

@ -12,6 +12,12 @@ class AllPagesFeedView(RedirectView):
permanent = True
@method_decorator(cache_control(max_age=60 * 60), name="dispatch")
class PageLinksView(RedirectView):
pattern_name = "api:page-links"
permanent = True
@method_decorator(cache_control(max_age=60 * 60), name="dispatch")
class TagView(RedirectView):
permanent = True