Example #1
0
from django.conf.urls import *
from django.utils.translation import ugettext_lazy as _
from apps.ecidadania.proposals.views import ListProposalSet, AddProposalSet, \
    ViewProposalSet, EditProposalSet, DeleteProposalSet, ListProposals, \
    ViewProposal, DeleteProposal, EditProposal, AddProposal

urlpatterns = patterns('apps.ecidadania.proposals.views',

    url(r'^$', ListProposalSet.as_view(), name='list-proposalset'),

    url(_(r'^addset/'), AddProposalSet.as_view(), name='add-proposalset'),

    url(_(r'^(?P<set_id>\w+)/$'), ViewProposalSet.as_view(), name='view-proposalset'),

    url(_(r'^(?P<set_id>\w+/edit/$)'), EditProposalSet.as_view(), name='edit-proposalset'),

    url(_(r'^(?P<set_id>\w+/delete/$)'), DeleteProposalSet.as_view(), name='delete-proposalset'),

    url(_(r'^add_support_vote/'), 'vote_proposal'),
    
    url(_(r'^add/'), AddProposal.as_view(), name='add-proposal'),

    url(_(r'^p/'), ListProposals.as_view(), name='list-proposals'),
    
    url(_(r'^p/(?P<prop_id>\w+)/edit/$'), EditProposal.as_view(), name='edit-proposal'),

    url(_(r'^p/(?P<prop_id>\w+)/delete/$'), DeleteProposal.as_view(), name='delete-proposal'),

    url(r'^p/(?P<prop_id>\w+)/', ViewProposal.as_view(), name='view-proposal'),
)
Example #2
0
# along with e-cidadania. If not, see <http://www.gnu.org/licenses/>.
"""
Proposal module URLs.
"""

from django.conf.urls import *
from django.utils.translation import ugettext_lazy as _
from apps.ecidadania.proposals.views import ListProposalSet, AddProposalSet, \
    ViewProposalSet, EditProposalSet, DeleteProposalSet, ListProposals, \
    ViewProposal, DeleteProposal, EditProposal, AddProposal, ValidateVote

urlpatterns = patterns(
    'apps.ecidadania.proposals.views',
    url(_(r'^$'), ListProposals.as_view(), name='list-proposals'),
    url(_(r'^psets/(?P<set_id>\w+)/edit/'),
        EditProposalSet.as_view(),
        name='edit-proposalset'),
    url(_(r'^psets/(?P<set_id>\w+)/delete/'),
        DeleteProposalSet.as_view(),
        name='delete-proposalset'),
    url(_(r'^psets/(?P<set_id>\w+)/'),
        ViewProposalSet.as_view(),
        name='view-proposalset'),
    url(_(r'^add/(?P<p_set>\w+)/'), AddProposal.as_view(),
        name='add-proposal'),
    url(_(r'^merged/(?P<p_set>\w+)/'),
        'merged_proposal',
        name='merged_proposal'),
    url(_(r'^psets/'), ListProposalSet.as_view(), name='list-proposalset'),
    url(_(r'^addset/'), AddProposalSet.as_view(), name='add-proposalset'),
    url(_(r'^add_support_vote/'), 'vote_proposal'),
Example #3
0
"""

from django.conf.urls import *
from django.utils.translation import ugettext_lazy as _
from apps.ecidadania.proposals.views import ListProposalSet, AddProposalSet, \
    ViewProposalSet, EditProposalSet, DeleteProposalSet, ListProposals, \
    ViewProposal, DeleteProposal, EditProposal, AddProposal

from apps.thirdparty.userroles.decorators import role_required
from apps.thirdparty.userroles import roles

urlpatterns = patterns('apps.ecidadania.proposals.views',

    url(_(r'^$'), ListProposals.as_view(), name='list-proposals'),
    
    url(_(r'^psets/(?P<set_id>\w+)/edit/'), EditProposalSet.as_view(), name='edit-proposalset'),
       
    url(_(r'^psets/(?P<set_id>\w+)/delete/'), DeleteProposalSet.as_view(), name='delete-proposalset'),
    
    url(_(r'^psets/(?P<set_id>\w+)/'), ViewProposalSet.as_view(), name='view-proposalset'),

    url(_(r'^psets/'), ListProposalSet.as_view(), name='list-proposalset'),

    url(_(r'^addset/'), role_required(roles.space_admin)(AddProposalSet.as_view()), name='add-proposalset'),

    url(_(r'^add/'), AddProposal.as_view(), name='add-proposal'),

    url(_(r'^add_support_vote/'),'vote_proposal'),

    url(_(r'^(?P<prop_id>\w+)/$'), ViewProposal.as_view(), name='view-proposal'),