Skip to content

Commit

Permalink
Refactorise les URL de 'pages'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed May 7, 2022
1 parent ad855f7 commit 19039fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions zds/pages/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.urls import re_path
from django.urls import path

from zds.pages.views import (
about,
Expand All @@ -16,16 +16,16 @@

urlpatterns = [
# single pages
re_path(r"^apropos/$", about, name="pages-about"),
re_path(r"^association/$", association, name="pages-association"),
re_path(r"^contact/$", ContactView.as_view(), name="pages-contact"),
re_path(r"^cgu/$", eula, name="pages-eula"),
re_path(r"^alertes/$", alerts, name="pages-alerts"),
re_path(r"^cookies/$", cookies, name="pages-cookies"),
re_path(r"^historique-editions/(?P<comment_pk>\d+)/$", CommentEditsHistory.as_view(), name="comment-edits-history"),
re_path(r"^contenu-original/(?P<pk>\d+)/$", EditDetail.as_view(), name="edit-detail"),
re_path(r"^restaurer-edition/(?P<edit_pk>\d+)/$", restore_edit, name="restore-edit"),
re_path(r"^supprimer-contenu-edition/(?P<edit_pk>\d+)/$", delete_edit_content, name="delete-edit-content"),
path("apropos/", about, name="pages-about"),
path("association/", association, name="pages-association"),
path("contact/", ContactView.as_view(), name="pages-contact"),
path("cgu/", eula, name="pages-eula"),
path("alertes/", alerts, name="pages-alerts"),
path("cookies/", cookies, name="pages-cookies"),
path("historique-editions/<int:comment_pk>/", CommentEditsHistory.as_view(), name="comment-edits-history"),
path("contenu-original/<int:pk>/", EditDetail.as_view(), name="edit-detail"),
path("restaurer-edition/<int:edit_pk>/", restore_edit, name="restore-edit"),
path("supprimer-contenu-edition/<int:edit_pk>/", delete_edit_content, name="delete-edit-content"),
# index
re_path(r"^$", index, name="pages-index"),
path("", index, name="pages-index"),
]
2 changes: 1 addition & 1 deletion zds/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def location(self, item):
re_path(r"^mp/", include(("zds.mp.urls", ""))),
re_path(r"^membres/", include(("zds.member.urls", ""))),
re_path(r"^admin/", admin.site.urls),
re_path(r"^pages/", include(("zds.pages.urls", ""))),
path("pages/", include("zds.pages.urls")),
re_path(r"^galerie/", include(("zds.gallery.urls", ""))),
re_path(r"^rechercher/", include(("zds.searchv2.urls", "zds.searchv2"), namespace="search")),
re_path(r"^munin/", include(("zds.munin.urls", ""))),
Expand Down

0 comments on commit 19039fe

Please sign in to comment.