OpenSlides/openslides/assignment/urls.py

119 lines
3.0 KiB
Python
Raw Normal View History

2011-07-31 10:46:29 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
openslides.assignments.urls
~~~~~~~~~~~~~~~~~~~~~~~~~~~
URL list for the assignment app.
:copyright: 20112013 by OpenSlides team, see AUTHORS.
2011-07-31 10:46:29 +02:00
:license: GNU GPL, see LICENSE for more details.
"""
from django.conf.urls import url, patterns
2011-07-31 10:46:29 +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
urlpatterns = patterns('openslides.assignment.views',
url(r'^$',
AssignmentListView.as_view(),
name='assignment_list',
),
2011-07-31 10:46:29 +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/$',
AssignmentCreateView.as_view(),
name='assignment_create',
),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/edit/$',
AssignmentUpdateView.as_view(),
name='assignment_update',
),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/del/$',
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})/$',
AssignmentSetStatusView.as_view(),
name='assignment_set_status',
),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/run/$',
AssignmentRunView.as_view(),
name='assignment_run',
),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/delrun/$',
AssignmentRunDeleteView.as_view(),
name='assignment_delrun',
),
2011-07-31 10:46:29 +02:00
url(r'^(?P<pk>\d+)/delother/(?P<user_id>[^/]+)/$',
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/$',
2012-04-20 14:33:40 +02:00
AssignmentPollPDF.as_view(),
name='assignment_poll_pdf',
),
2011-07-31 10:46:29 +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/$',
AssignmentPDF.as_view(),
name='assignment_list_pdf',
),
2011-09-07 07:52:44 +02:00
url(r'^(?P<pk>\d+)/print/$',
AssignmentPDF.as_view(),
name='assignment_pdf',
),
2011-09-07 07:52:44 +02:00
url(r'^(?P<pk>\d+)/gen_poll/$',
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+)/$',
PollUpdateView.as_view(),
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/$',
AssignmentPollDeleteView.as_view(),
name='assignment_poll_delete',
),
url(r'^poll/(?P<pk>\d+)/pub/$',
SetPublishStatusView.as_view(),
name='assignment_poll_publish_status',
),
url(r'^(?P<pk>\d+)/elected/(?P<user_id>[^/]+)/$',
SetElectedView.as_view(),
{'elected': True},
name='assignment_user_elected',
),
url(r'^(?P<pk>\d+)/notelected/(?P<user_id>[^/]+)/$',
SetElectedView.as_view(),
{'elected': False},
name='assignment_user_not_elected',
),
2011-07-31 10:46:29 +02:00
)