kadenios/elections/urls.py

81 lines
2.3 KiB
Python
Raw Normal View History

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 = [
# Admin views
2020-11-20 17:46:53 +01:00
path("create/", views.ElectionCreateView.as_view(), name="election.create"),
2020-12-19 15:04:04 +01:00
path("admin/<int:pk>", views.ElectionAdminView.as_view(), name="election.admin"),
path(
"mail-voters/<int:pk>",
views.ElectionMailVotersView.as_view(),
name="election.mail-voters",
),
path(
"upload-voters/<int:pk>",
views.ElectionUploadVotersView.as_view(),
name="election.upload-voters",
),
path(
"export-voters/<int:pk>",
views.ExportVotersView.as_view(),
name="election.export-voters",
),
path(
"delete-vote/<int:pk>/<int:user_pk>/<int:anchor>",
views.DeleteVoteView.as_view(),
name="election.delete-vote",
),
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(
"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"
),
# 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
path("", views.ElectionListView.as_view(), name="election.list"),
2020-11-20 17:46:53 +01:00
path("view/<int:pk>", views.ElectionView.as_view(), name="election.view"),
2021-03-20 12:09:37 +01:00
path(
"view/<int:pk>/voters",
views.ElectionVotersView.as_view(),
name="election.voters",
),
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
]