OpenSlides/openslides/config/urls.py

20 lines
670 B
Python
Raw Normal View History

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_collection_view')
2012-03-16 14:31:59 +01:00
)
2012-02-15 12:04:11 +01:00
for receiver, config_collection in config_signal.send(sender='config_urls'):
if config_collection.is_shown():
urlpatterns += patterns('', url(r'^%s/$' % config_collection.url,
ConfigView.as_view(config_collection=config_collection),
name='config_%s' % config_collection.url))