OpenSlides/openslides/projector/urls.py

125 lines
2.9 KiB
Python
Raw Normal View History

2012-02-06 22:08:08 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
openslides.projector.urls
2012-04-25 22:29:19 +02:00
~~~~~~~~~~~~~~~~~~~~~~~~
2012-02-06 22:08:08 +01:00
URL list for the projector app.
2012-04-25 22:29:19 +02:00
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
2012-02-06 22:08:08 +01:00
:license: GNU GPL, see LICENSE for more details.
"""
from django.conf.urls.defaults import *
from openslides.utils.views import CreateView
from openslides.projector.models import ProjectorSlide
from openslides.projector.views import (ControlView, ActivateView,
CustomSlideCreateView, CustomSlideUpdateView, CustomSlideDeleteView,
CountdownEdit)
2012-03-12 18:22:18 +01:00
2012-03-03 09:11:56 +01:00
2012-02-06 22:08:08 +01:00
urlpatterns = patterns('projector.views',
url(r'^$', 'active_slide',
2012-04-18 15:47:51 +02:00
{'sid': None},
name='projector_show',
),
url(r'^preview/(?P<sid>[^/]*)/$',
'active_slide',
name='projctor_preview_slide',
),
2012-02-06 22:08:08 +01:00
2012-04-18 15:47:51 +02:00
url(r'^control/$',
2012-03-06 19:55:19 +01:00
ControlView.as_view(),
name='projector_control',
2012-03-03 09:11:56 +01:00
),
url(r'^activate/(?P<sid>[^/]*)/$',
ActivateView.as_view(),
name='projector_activate_slide',
),
url(r'^activate/(?P<sid>[^/]*)/summary/$',
ActivateView.as_view(),
{'summary': True},
name='projector_activate_summary',
),
2012-03-12 18:22:18 +01:00
url(r'^new/$',
2012-05-18 23:07:09 +02:00
CustomSlideCreateView.as_view(),
name='customslide_new',
),
2012-05-18 23:24:54 +02:00
2012-05-18 23:07:09 +02:00
url(r'^(?P<pk>\d+)/edit/$',
CustomSlideUpdateView.as_view(),
name='customslide_edit',
2012-03-12 18:22:18 +01:00
),
2012-05-18 23:24:54 +02:00
url(r'^(?P<pk>\d+)/del/$',
CustomSlideDeleteView.as_view(),
name='customslide_delete',
),
2012-02-20 20:35:12 +01:00
url(r'^bigger/$', 'projector_edit', {'direction': 'bigger'},
2012-02-06 22:08:08 +01:00
name='projector_bigger'),
2012-02-20 20:35:12 +01:00
url(r'^smaller/$', 'projector_edit', {'direction': 'smaller'},
2012-02-06 22:08:08 +01:00
name='projector_smaller'),
2012-02-20 20:35:12 +01:00
url(r'^up/$', 'projector_edit', {'direction': 'up'},
2012-02-06 22:08:08 +01:00
name='projector_up'),
2012-02-20 20:35:12 +01:00
url(r'^down/$', 'projector_edit', {'direction': 'down'},
2012-02-06 22:08:08 +01:00
name='projector_down'),
2012-02-20 20:35:12 +01:00
url(r'^clean/$', 'projector_edit', {'direction': 'clean'},
2012-02-06 22:08:08 +01:00
name='projector_clean'),
# TODO: Merge the following lines with this one:
## url(r'^countdown/(?P<command>[^/]*)/$',
## CountdownEdit.as_view(),
## name='countdown_edit',
## ),
url(r'^countdown/show/$',
CountdownEdit.as_view(),
{'command': 'show'},
name='countdown_open',
),
2012-02-06 22:08:08 +01:00
url(r'^countdown/hide/$',
CountdownEdit.as_view(),
{'command': 'hide'},
name='countdown_close',
),
2012-02-06 22:08:08 +01:00
url(r'^countdown/reset/$',
CountdownEdit.as_view(),
{'command': 'reset'},
name='countdown_reset',
),
2012-02-06 22:08:08 +01:00
url(r'^countdown/start/$',
CountdownEdit.as_view(),
{'command': 'start'},
name='countdown_start',
),
2012-02-06 22:08:08 +01:00
url(r'^countdown/stop/$',
CountdownEdit.as_view(),
{'command': 'stop'},
name='countdown_stop',
),
url(r'^countdown/set-default/$',
CountdownEdit.as_view(),
{'command': 'set-default'},
name='countdown_set_default',
),
2012-02-06 22:08:08 +01:00
)