Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactorise les URL de 'pages' #6298

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -86,7 +86,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")),
path("galerie/", include("zds.gallery.urls")),
re_path(r"^rechercher/", include(("zds.searchv2.urls", "zds.searchv2"), namespace="search")),
path("munin/", include(("zds.munin.urls", ""))),
Expand Down