urls.py 1.16 KB
Newer Older
1
from django.conf.urls import url
Sli's avatar
Sli committed
2
3
4
5

from election.views import *

urlpatterns = [
Sli's avatar
Sli committed
6
    url(r'^$', ElectionsListView.as_view(), name='list'),
Sli's avatar
Sli committed
7
    url(r'^add$', ElectionCreateView.as_view(), name='create'),
8
9
    url(r'^(?P<election_id>[0-9]+)/edit$', ElectionUpdateView.as_view(), name='update'),
    url(r'^(?P<election_id>[0-9]+)/list/add$', ElectionListCreateView.as_view(), name='create_list'),
Sli's avatar
Sli committed
10
    url(r'^(?P<election_id>[0-9]+)/role/create$', RoleCreateView.as_view(), name='create_role'),
Sli's avatar
Sli committed
11
12
    url(r'^(?P<role_id>[0-9]+)/role/edit$', RoleUpdateView.as_view(), name='update_role'),
    url(r'^(?P<role_id>[0-9]+)/role/delete$', RoleDeleteView.as_view(), name='delete_role'),
Sli's avatar
Sli committed
13
    url(r'^(?P<election_id>[0-9]+)/candidate/add$', CandidatureCreateView.as_view(), name='candidate'),
Sli's avatar
Sli committed
14
15
    url(r'^(?P<candidature_id>[0-9]+)/candidate/edit$', CandidatureUpdateView.as_view(), name='update_candidate'),
    url(r'^(?P<candidature_id>[0-9]+)/candidate/delete$', CandidatureDeleteView.as_view(), name='delete_candidate'),
16
    url(r'^(?P<election_id>[0-9]+)/vote$', VoteFormView.as_view(), name='vote'),
Sli's avatar
Sli committed
17
    url(r'^(?P<election_id>[0-9]+)/detail$', ElectionDetailView.as_view(), name='detail'),
Sli's avatar
Sli committed
18
]