OpenSlides/openslides/assignment/urls.py

89 lines
2.5 KiB
Python
Raw Normal View History

2011-07-31 10:46:29 +02:00
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
2011-07-31 10:46:29 +02:00
from . import views
2012-02-19 19:27:00 +01:00
urlpatterns = patterns(
'',
url(r'^$',
views.AssignmentListView.as_view(),
name='assignment_list'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/$',
views.AssignmentDetail.as_view(),
name='assignment_detail'),
2011-07-31 10:46:29 +02:00
2012-07-10 11:27:06 +02:00
url(r'^new/$',
views.AssignmentCreateView.as_view(),
name='assignment_create'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/edit/$',
views.AssignmentUpdateView.as_view(),
name='assignment_update'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/del/$',
views.AssignmentDeleteView.as_view(),
name='assignment_delete'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/setstatus/(?P<status>[a-z]{3})/$',
views.AssignmentSetStatusView.as_view(),
name='assignment_set_status'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/run/$',
views.AssignmentRunView.as_view(),
name='assignment_run'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/delrun/$',
views.AssignmentRunDeleteView.as_view(),
name='assignment_delrun'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/delother/(?P<user_id>[^/]+)/$',
views.AssignmentRunOtherDeleteView.as_view(),
name='assignment_delother'),
2011-07-31 10:46:29 +02:00
2012-06-23 10:27:58 +02:00
url(r'^poll/(?P<poll_id>\d+)/print/$',
views.AssignmentPollPDF.as_view(),
name='assignment_poll_pdf'),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/agenda/$',
views.CreateRelatedAgendaItemView.as_view(),
name='assignment_create_agenda'),
2012-06-23 10:27:58 +02:00
url(r'^print/$',
views.AssignmentPDF.as_view(),
name='assignment_list_pdf'),
2011-09-07 07:52:44 +02:00
url(r'^(?P<pk>\d+)/print/$',
views.AssignmentPDF.as_view(),
name='assignment_pdf'),
2011-09-07 07:52:44 +02:00
url(r'^(?P<pk>\d+)/gen_poll/$',
views.PollCreateView.as_view(),
name='assignment_poll_create'),
2011-07-31 10:46:29 +02:00
2012-07-10 11:27:06 +02:00
url(r'^poll/(?P<poll_id>\d+)/$',
views.PollUpdateView.as_view(),
name='assignment_poll_view'),
2011-07-31 10:46:29 +02:00
2012-07-10 11:27:06 +02:00
url(r'^poll/(?P<pk>\d+)/del/$',
views.AssignmentPollDeleteView.as_view(),
name='assignment_poll_delete'),
# TODO: use seperate urls to publish and unpublish the poll
# see assignment_user_elected
url(r'^poll/(?P<pk>\d+)/pub/$',
views.SetPublishStatusView.as_view(),
name='assignment_poll_publish_status'),
url(r'^(?P<pk>\d+)/elected/(?P<user_id>[^/]+)/$',
views.SetElectedView.as_view(),
{'elected': True},
name='assignment_user_elected'),
url(r'^(?P<pk>\d+)/notelected/(?P<user_id>[^/]+)/$',
views.SetElectedView.as_view(),
{'elected': False},
name='assignment_user_not_elected')
2011-07-31 10:46:29 +02:00
)