OpenSlides/openslides/config/urls.py

22 lines
648 B
Python
Raw Normal View History

2011-07-31 10:46:29 +02:00
# -*- coding: utf-8 -*-
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))