mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
django2.2: migrate url to re_path
This commit is contained in:
@ -1,55 +1,57 @@
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from election.views import *
|
||||
|
||||
urlpatterns = [
|
||||
url(r"^$", ElectionsListView.as_view(), name="list"),
|
||||
url(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"),
|
||||
url(r"^add$", ElectionCreateView.as_view(), name="create"),
|
||||
url(r"^(?P<election_id>[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update"),
|
||||
url(
|
||||
re_path(r"^$", ElectionsListView.as_view(), name="list"),
|
||||
re_path(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"),
|
||||
re_path(r"^add$", ElectionCreateView.as_view(), name="create"),
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update"
|
||||
),
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/delete$", ElectionDeleteView.as_view(), name="delete"
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/list/add$",
|
||||
ElectionListCreateView.as_view(),
|
||||
name="create_list",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<list_id>[0-9]+)/list/delete$",
|
||||
ElectionListDeleteView.as_view(),
|
||||
name="delete_list",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/role/create$",
|
||||
RoleCreateView.as_view(),
|
||||
name="create_role",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<role_id>[0-9]+)/role/edit$", RoleUpdateView.as_view(), name="update_role"
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<role_id>[0-9]+)/role/delete$",
|
||||
RoleDeleteView.as_view(),
|
||||
name="delete_role",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/candidate/add$",
|
||||
CandidatureCreateView.as_view(),
|
||||
name="candidate",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<candidature_id>[0-9]+)/candidate/edit$",
|
||||
CandidatureUpdateView.as_view(),
|
||||
name="update_candidate",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^(?P<candidature_id>[0-9]+)/candidate/delete$",
|
||||
CandidatureDeleteView.as_view(),
|
||||
name="delete_candidate",
|
||||
),
|
||||
url(r"^(?P<election_id>[0-9]+)/vote$", VoteFormView.as_view(), name="vote"),
|
||||
url(
|
||||
re_path(r"^(?P<election_id>[0-9]+)/vote$", VoteFormView.as_view(), name="vote"),
|
||||
re_path(
|
||||
r"^(?P<election_id>[0-9]+)/detail$", ElectionDetailView.as_view(), name="detail"
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user