2020-11-20 17:46:53 +01:00
|
|
|
from django.urls import path
|
2020-12-18 00:19:18 +01:00
|
|
|
|
2020-11-20 17:46:53 +01:00
|
|
|
from . import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
2020-12-20 02:32:26 +01:00
|
|
|
# Admin views
|
2020-11-20 17:46:53 +01:00
|
|
|
path("create/", views.ElectionCreateView.as_view(), name="election.create"),
|
2020-12-19 23:48:18 +01:00
|
|
|
path("created/", views.ElectionListView.as_view(), name="election.created"),
|
2020-12-19 15:04:04 +01:00
|
|
|
path("admin/<int:pk>", views.ElectionAdminView.as_view(), name="election.admin"),
|
2020-12-22 01:17:38 +01:00
|
|
|
path(
|
|
|
|
"upload-voters/<int:pk>",
|
|
|
|
views.ElectionUploadVotersView.as_view(),
|
|
|
|
name="election.upload-voters",
|
|
|
|
),
|
2020-11-20 17:46:53 +01:00
|
|
|
path("update/<int:pk>", views.ElectionUpdateView.as_view(), name="election.update"),
|
2020-12-19 16:57:28 +01:00
|
|
|
path("tally/<int:pk>", views.ElectionTallyView.as_view(), name="election.tally"),
|
|
|
|
path(
|
2020-12-19 18:26:25 +01:00
|
|
|
"publish/<int:pk>",
|
|
|
|
views.ElectionChangePublicationView.as_view(),
|
|
|
|
name="election.publish",
|
2020-12-19 16:57:28 +01:00
|
|
|
),
|
|
|
|
path(
|
|
|
|
"archive/<int:pk>", views.ElectionArchiveView.as_view(), name="election.archive"
|
|
|
|
),
|
2020-12-20 02:32:26 +01:00
|
|
|
# Question views
|
|
|
|
path(
|
|
|
|
"add-question/<int:pk>",
|
|
|
|
views.AddQuestionView.as_view(),
|
|
|
|
name="election.add-question",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"mod-question/<int:pk>",
|
|
|
|
views.ModQuestionView.as_view(),
|
|
|
|
name="election.mod-question",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"del-question/<int:pk>",
|
|
|
|
views.DelQuestionView.as_view(),
|
|
|
|
name="election.del-question",
|
|
|
|
),
|
|
|
|
# Option views
|
|
|
|
path(
|
|
|
|
"add-option/<int:pk>",
|
|
|
|
views.AddOptionView.as_view(),
|
|
|
|
name="election.add-option",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"mod-option/<int:pk>",
|
|
|
|
views.ModOptionView.as_view(),
|
|
|
|
name="election.mod-option",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"del-option/<int:pk>",
|
|
|
|
views.DelOptionView.as_view(),
|
|
|
|
name="election.del-option",
|
|
|
|
),
|
|
|
|
# Common views
|
2020-11-20 17:46:53 +01:00
|
|
|
path("view/<int:pk>", views.ElectionView.as_view(), name="election.view"),
|
2020-12-18 00:19:18 +01:00
|
|
|
path("vote/<int:pk>", views.VoteView.as_view(), name="election.vote"),
|
2020-11-20 17:46:53 +01:00
|
|
|
]
|