2011-07-31 10:46:29 +02:00
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
"""
|
|
|
|
|
openslides.assignments.urls
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
URL list for the assignment app.
|
|
|
|
|
|
2013-03-01 17:13:12 +01:00
|
|
|
|
:copyright: 2011–2013 by OpenSlides team, see AUTHORS.
|
2011-07-31 10:46:29 +02:00
|
|
|
|
:license: GNU GPL, see LICENSE for more details.
|
|
|
|
|
"""
|
|
|
|
|
|
2013-01-05 01:05:38 +01:00
|
|
|
|
from django.conf.urls import url, patterns
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
from openslides.assignment.views import (AssignmentListView, AssignmentDetail,
|
|
|
|
|
AssignmentCreateView, AssignmentUpdateView, AssignmentDeleteView,
|
|
|
|
|
AssignmentSetStatusView, AssignmentRunView, AssignmentRunDeleteView,
|
|
|
|
|
AssignmentRunOtherDeleteView, PollCreateView, PollUpdateView, AssignmentPDF,
|
|
|
|
|
AssignmentPollPDF, AssignmentPollDeleteView, SetPublishStatusView,
|
|
|
|
|
SetElectedView, CreateRelatedAgendaItemView)
|
2012-02-19 19:27:00 +01:00
|
|
|
|
|
2012-07-10 14:00:51 +02:00
|
|
|
|
urlpatterns = patterns('openslides.assignment.views',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
url(r'^$',
|
2013-09-08 14:33:43 +02:00
|
|
|
|
AssignmentListView.as_view(),
|
|
|
|
|
name='assignment_list',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/$',
|
|
|
|
|
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/$',
|
2013-09-08 14:33:43 +02:00
|
|
|
|
AssignmentCreateView.as_view(),
|
|
|
|
|
name='assignment_create',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/edit/$',
|
|
|
|
|
AssignmentUpdateView.as_view(),
|
|
|
|
|
name='assignment_update',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/del/$',
|
|
|
|
|
AssignmentDeleteView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_delete',
|
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/setstatus/(?P<status>[a-z]{3})/$',
|
|
|
|
|
AssignmentSetStatusView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_set_status',
|
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/run/$',
|
|
|
|
|
AssignmentRunView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_run',
|
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/delrun/$',
|
|
|
|
|
AssignmentRunDeleteView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_delrun',
|
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/delother/(?P<user_id>[^/]+)/$',
|
|
|
|
|
AssignmentRunOtherDeleteView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
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/$',
|
2012-04-20 14:33:40 +02:00
|
|
|
|
AssignmentPollPDF.as_view(),
|
2013-09-08 14:33:43 +02:00
|
|
|
|
name='assignment_poll_pdf',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-09-07 00:18:13 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/agenda/$',
|
|
|
|
|
CreateRelatedAgendaItemView.as_view(),
|
2012-06-23 10:27:58 +02:00
|
|
|
|
name='assignment_create_agenda',
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
url(r'^print/$',
|
2012-04-14 14:24:13 +02:00
|
|
|
|
AssignmentPDF.as_view(),
|
2013-09-08 14:33:43 +02:00
|
|
|
|
name='assignment_list_pdf',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-09-07 07:52:44 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/print/$',
|
2012-04-14 14:24:13 +02:00
|
|
|
|
AssignmentPDF.as_view(),
|
2013-09-08 14:33:43 +02:00
|
|
|
|
name='assignment_pdf',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-09-07 07:52:44 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/gen_poll/$',
|
|
|
|
|
PollCreateView.as_view(),
|
|
|
|
|
name='assignment_poll_create',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
|
url(r'^poll/(?P<poll_id>\d+)/$',
|
2013-09-08 14:33:43 +02:00
|
|
|
|
PollUpdateView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_poll_view',
|
2012-02-19 19:27:00 +01:00
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
|
url(r'^poll/(?P<pk>\d+)/del/$',
|
2013-09-08 14:33:43 +02:00
|
|
|
|
AssignmentPollDeleteView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
name='assignment_poll_delete',
|
|
|
|
|
),
|
2011-09-03 11:42:44 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^poll/(?P<pk>\d+)/pub/$',
|
|
|
|
|
SetPublishStatusView.as_view(),
|
2012-05-20 20:02:36 +02:00
|
|
|
|
name='assignment_poll_publish_status',
|
2012-04-13 21:43:16 +02:00
|
|
|
|
),
|
2011-09-08 12:30:34 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/elected/(?P<user_id>[^/]+)/$',
|
|
|
|
|
SetElectedView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
{'elected': True},
|
|
|
|
|
name='assignment_user_elected',
|
|
|
|
|
),
|
2011-09-03 11:42:44 +02:00
|
|
|
|
|
2013-09-08 14:33:43 +02:00
|
|
|
|
url(r'^(?P<pk>\d+)/notelected/(?P<user_id>[^/]+)/$',
|
|
|
|
|
SetElectedView.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
|
{'elected': False},
|
|
|
|
|
name='assignment_user_not_elected',
|
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
)
|