Sith/election/urls.py

58 lines
1.7 KiB
Python
Raw Normal View History

2019-10-05 16:14:41 +00:00
from django.urls import re_path
2016-12-05 19:18:03 +00:00
from election.views import *
urlpatterns = [
2019-10-05 16:14:41 +00:00
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(
2018-10-04 19:29:19 +00:00
r"^(?P<election_id>[0-9]+)/delete$", ElectionDeleteView.as_view(), name="delete"
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<election_id>[0-9]+)/list/add$",
ElectionListCreateView.as_view(),
name="create_list",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<list_id>[0-9]+)/list/delete$",
ElectionListDeleteView.as_view(),
name="delete_list",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<election_id>[0-9]+)/role/create$",
RoleCreateView.as_view(),
name="create_role",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<role_id>[0-9]+)/role/edit$", RoleUpdateView.as_view(), name="update_role"
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<role_id>[0-9]+)/role/delete$",
RoleDeleteView.as_view(),
name="delete_role",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<election_id>[0-9]+)/candidate/add$",
CandidatureCreateView.as_view(),
name="candidate",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<candidature_id>[0-9]+)/candidate/edit$",
CandidatureUpdateView.as_view(),
name="update_candidate",
),
2019-10-05 16:14:41 +00:00
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<candidature_id>[0-9]+)/candidate/delete$",
CandidatureDeleteView.as_view(),
name="delete_candidate",
),
2019-10-05 16:14:41 +00:00
re_path(r"^(?P<election_id>[0-9]+)/vote$", VoteFormView.as_view(), name="vote"),
re_path(
2018-10-04 19:29:19 +00:00
r"^(?P<election_id>[0-9]+)/detail$", ElectionDetailView.as_view(), name="detail"
),
2016-12-05 22:49:13 +00:00
]