2011-07-31 10:46:29 +02:00
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
"""
|
2012-04-14 12:52:56 +02:00
|
|
|
|
openslides.config.urls
|
2011-07-31 10:46:29 +02:00
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
2013-03-01 17:13:12 +01:00
|
|
|
|
Url patterns for the config app.
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
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 patterns, url
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
2013-03-01 17:13:12 +01:00
|
|
|
|
from openslides.utils.views import RedirectView
|
|
|
|
|
from .signals import config_signal
|
|
|
|
|
from .views import ConfigView
|
2012-02-15 12:04:11 +01:00
|
|
|
|
|
2012-04-15 10:36:37 +02:00
|
|
|
|
|
2013-03-01 17:13:12 +01:00
|
|
|
|
urlpatterns = patterns('',
|
|
|
|
|
url(r'^$',
|
|
|
|
|
RedirectView.as_view(url_name='config_general'),
|
|
|
|
|
name='config_first_config_page',
|
2012-04-15 10:36:37 +02:00
|
|
|
|
),
|
2012-03-16 14:31:59 +01:00
|
|
|
|
)
|
2012-02-15 12:04:11 +01:00
|
|
|
|
|
2013-03-01 17:13:12 +01:00
|
|
|
|
for receiver, config_page in config_signal.send(sender='config_urls'):
|
|
|
|
|
if config_page.is_shown():
|
|
|
|
|
urlpatterns += patterns('', url(r'^%s/$' % config_page.url,
|
|
|
|
|
ConfigView.as_view(config_page=config_page),
|
|
|
|
|
name='config_%s' % config_page.url))
|