kadenios/petitions/urls.py

33 lines
1.1 KiB
Python

from django.urls import path
from . import views
urlpatterns = [
# Admin views
path("create", views.PetitionCreateView.as_view(), name="petition.create"),
path("admin/<int:pk>", views.PetitionAdminView.as_view(), name="petition.admin"),
path("update/<int:pk>", views.PetitionUpdateView.as_view(), name="petition.update"),
path(
"archive/<int:pk>", views.PetitionArchiveView.as_view(), name="petition.archive"
),
path(
"delete/<int:pk>/<int:signature_pk>/<int:anchor>",
views.DeleteSignatureView.as_view(),
name="petition.delete-signature",
),
path(
"validate/<int:pk>/<int:signature_pk>/<int:anchor>",
views.ValidateSignatureView.as_view(),
name="petition.validate",
),
# Verification views
path(
"email/<slug:token>",
views.EmailValidationView.as_view(),
name="petition.confirm-email",
),
# Public views
path("", views.PetitionListView.as_view(), name="petition.list"),
path("view/<int:pk>", views.PetitionView.as_view(), name="petition.view"),
path("sign/<int:pk>", views.PetitionSignView.as_view(), name="petition.sign"),
]