Sith/election/urls.py

50 lines
1.5 KiB
Python
Raw Normal View History

2023-01-09 21:07:03 +00:00
from django.urls import path
2016-12-05 19:18:03 +00:00
from election.views import *
urlpatterns = [
2023-01-09 21:07:03 +00:00
path("", ElectionsListView.as_view(), name="list"),
path("archived/", ElectionListArchivedView.as_view(), name="list_archived"),
path("add/", ElectionCreateView.as_view(), name="create"),
path("<int:election_id>/edit/", ElectionUpdateView.as_view(), name="update"),
path("<int:election_id>/delete/", ElectionDeleteView.as_view(), name="delete"),
path(
"<int:election_id>/list/add/",
2018-10-04 19:29:19 +00:00
ElectionListCreateView.as_view(),
name="create_list",
),
2023-01-09 21:07:03 +00:00
path(
"<int:list_id>/list/delete/",
2018-10-04 19:29:19 +00:00
ElectionListDeleteView.as_view(),
name="delete_list",
),
2023-01-09 21:07:03 +00:00
path(
"<int:election_id>/role/create/",
2018-10-04 19:29:19 +00:00
RoleCreateView.as_view(),
name="create_role",
),
2023-01-09 21:07:03 +00:00
path("<int:role_id>/role/edit/", RoleUpdateView.as_view(), name="update_role"),
path(
"<int:role_id>/role/delete/",
2018-10-04 19:29:19 +00:00
RoleDeleteView.as_view(),
name="delete_role",
),
2023-01-09 21:07:03 +00:00
path(
"<int:election_id>/candidate/add/",
2018-10-04 19:29:19 +00:00
CandidatureCreateView.as_view(),
name="candidate",
),
2023-01-09 21:07:03 +00:00
path(
"<int:candidature_id>/candidate/edit/",
2018-10-04 19:29:19 +00:00
CandidatureUpdateView.as_view(),
name="update_candidate",
),
2023-01-09 21:07:03 +00:00
path(
"<int:candidature_id>/candidate/delete/",
2018-10-04 19:29:19 +00:00
CandidatureDeleteView.as_view(),
name="delete_candidate",
),
2023-01-09 21:07:03 +00:00
path("<int:election_id>/vote/", VoteFormView.as_view(), name="vote"),
path("<int:election_id>/detail/", ElectionDetailView.as_view(), name="detail"),
2016-12-05 22:49:13 +00:00
]