Added view permission to all data models. Added fixtures autoload.
[e_cidadania.git] / src / apps / ecidadania / voting / urls.py
blob8c5d4c8415851fbf4a06cee9f69fe3d9c96a86ed
1 # -*- coding: utf-8 -*-
3 # Copyright (c) 2010-2012 Cidadania S. Coop. Galega
5 # This file is part of e-cidadania.
7 # e-cidadania is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # e-cidadania is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with e-cidadania. If not, see <http://www.gnu.org/licenses/>.
20 from django.conf.urls import *
21 from django.conf import settings
22 from django.conf.urls.i18n import i18n_patterns
23 from django.contrib import admin
24 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
25 from apps.ecidadania.voting.views.polls import ViewPoll, DeletePoll, \
26 ListPolls, ViewPollResults
27 from apps.ecidadania.voting.views.voting import ViewVoting, ListVotings, \
28 AddVoting, EditVoting, DeleteVoting
29 from apps.ecidadania.voting.url_names import *
32 urlpatterns = patterns('apps.ecidadania.voting.views',
34 url(r'^$', ListVotings.as_view(), name=LIST_VOTING),
36 url(r'^poll/$', ListPolls.as_view(), name=LIST_POLL),
38 url(r'^add/$', AddVoting.as_view(), name=ADD_VOTING),
40 url(r'^add/poll/$', 'polls.add_poll', name=ADD_POLL),
42 url(r'^poll/(?P<poll_id>\d+)/edit/$', 'polls.edit_poll', name=EDIT_POLL),
44 url(r'^(?P<voting_id>\d+)/edit/$', EditVoting.as_view(),
45 name=EDIT_VOTING),
47 url(r'^poll/(?P<poll_id>\d+)/delete/$', DeletePoll.as_view(),
48 name=DELETE_POLL),
50 url(r'^(?P<voting_id>\d+)/delete/$', DeleteVoting.as_view(),
51 name=DELETE_VOTING),
53 url(r'^poll/(?P<pk>\d+)/$', ViewPoll.as_view(), name=VIEW_POLL),
55 url(r'^poll/(?P<pk>\d+)/results/$', ViewPollResults.as_view(),
56 name=VIEW_RESULT),
58 url(r'^(?P<voting_id>\d+)/$', ViewVoting.as_view(), name=VIEW_VOTING),
60 url(r'^vote/poll/(?P<poll_id>\d+)/$', 'polls.vote_poll', name=VOTE_POLL),
62 url(r'^vote/voting/$', 'voting.vote_voting', name=VOTE_VOTING),
64 url(r'^vote/validate/(?P<token>\w+)/$', 'voting.validate_voting',
65 name=VALIDATE_VOTE),