2011-07-31 10:46:29 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
openslides.assignments.urls
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
URL list for the assignment app.
|
|
|
|
|
2012-04-25 22:29:19 +02:00
|
|
|
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
|
2011-07-31 10:46:29 +02:00
|
|
|
:license: GNU GPL, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
from django.conf.urls.defaults import url, patterns
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 14:00:51 +02:00
|
|
|
from openslides.assignment.views import (ViewPoll, AssignmentPDF,
|
|
|
|
AssignmentPollPDF, AssignmentPollDelete, CreateAgendaItem)
|
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'^$',
|
|
|
|
'get_overview',
|
|
|
|
name='assignment_overview',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'view',
|
2011-07-31 10:46:29 +02:00
|
|
|
name='assignment_view'),
|
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^new/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'edit',
|
|
|
|
name='assignment_new',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/edit/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'edit',
|
|
|
|
name='assignment_edit',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/del/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'delete',
|
|
|
|
name='assignment_delete',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/setstatus/(?P<status>[a-z]{3})/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'set_status',
|
|
|
|
name='assignment_set_status',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/run/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'run',
|
|
|
|
name='assignment_run',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/delrun/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'delrun',
|
|
|
|
name='assignment_delrun',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-08-03 13:49:05 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/delother/(?P<user_id>[^/]+)/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'delother',
|
|
|
|
name='assignment_delother',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-04-13 21:43:16 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/set_active/$',
|
|
|
|
'set_active',
|
|
|
|
name='assignment_activate_item',
|
|
|
|
),
|
2011-11-01 14:45:24 +01: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(),
|
2012-04-13 21:43:16 +02:00
|
|
|
name='print_assignment_poll',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-06-23 10:27:58 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/agenda/$',
|
|
|
|
CreateAgendaItem.as_view(),
|
|
|
|
name='assignment_create_agenda',
|
|
|
|
),
|
|
|
|
|
|
|
|
url(r'^print/$',
|
2012-04-14 14:24:13 +02:00
|
|
|
AssignmentPDF.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
name='print_assignment',
|
|
|
|
),
|
2011-09-07 07:52:44 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/print/$',
|
2012-04-14 14:24:13 +02:00
|
|
|
AssignmentPDF.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
name='print_assignment',
|
|
|
|
),
|
2011-09-07 07:52:44 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/gen_poll/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'gen_poll',
|
|
|
|
name='assignment_gen_poll',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^poll/(?P<poll_id>\d+)/$',
|
2012-02-19 19:27:00 +01:00
|
|
|
ViewPoll.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/$',
|
2012-04-14 14:24:13 +02:00
|
|
|
AssignmentPollDelete.as_view(),
|
2012-04-13 21:43:16 +02:00
|
|
|
name='assignment_poll_delete',
|
|
|
|
),
|
2011-09-03 11:42:44 +02:00
|
|
|
|
2012-04-13 21:43:16 +02:00
|
|
|
url(r'^poll/(?P<poll_id>\d+)/pub/$',
|
2012-05-20 20:02:36 +02:00
|
|
|
'set_publish_status',
|
|
|
|
name='assignment_poll_publish_status',
|
2012-04-13 21:43:16 +02:00
|
|
|
),
|
2011-09-08 12:30:34 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/elected/(?P<profile_id>\d+)/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'set_elected',
|
|
|
|
{'elected': True},
|
|
|
|
name='assignment_user_elected',
|
|
|
|
),
|
2011-09-03 11:42:44 +02:00
|
|
|
|
2012-07-10 11:27:06 +02:00
|
|
|
url(r'^(?P<assignment_id>\d+)/notelected/(?P<profile_id>\d+)/$',
|
2012-04-13 21:43:16 +02:00
|
|
|
'set_elected',
|
|
|
|
{'elected': False},
|
|
|
|
name='assignment_user_not_elected',
|
|
|
|
),
|
2011-07-31 10:46:29 +02:00
|
|
|
)
|