OpenSlides/openslides/config/urls.py

32 lines
885 B
Python
Raw Normal View History

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