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
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2012-04-14 12:52:56 +02:00
|
|
|
URL list for the config app.
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-04-25 22:29:19 +02:00
|
|
|
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
|
2011-07-31 10:46:29 +02:00
|
|
|
:license: GNU GPL, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
|
2012-07-07 14:48:21 +02:00
|
|
|
from django.conf import settings
|
|
|
|
from django.conf.urls.defaults import patterns, url
|
2012-03-16 14:31:59 +01:00
|
|
|
from django.utils.importlib import import_module
|
2011-07-31 10:46:29 +02:00
|
|
|
|
2012-07-07 14:48:21 +02:00
|
|
|
from openslides.config.views import GeneralConfig, VersionConfig
|
2012-02-15 12:04:11 +01:00
|
|
|
|
2012-07-07 14:48:21 +02:00
|
|
|
urlpatterns = patterns('',
|
2012-03-16 14:31:59 +01:00
|
|
|
url(r'^general/$',
|
|
|
|
GeneralConfig.as_view(),
|
|
|
|
name='config_general',
|
|
|
|
),
|
2012-04-15 10:36:37 +02:00
|
|
|
|
|
|
|
url(r'^version/$',
|
|
|
|
VersionConfig.as_view(),
|
|
|
|
name='config_version',
|
|
|
|
),
|
2012-03-16 14:31:59 +01:00
|
|
|
)
|
2012-02-15 12:04:11 +01:00
|
|
|
|
2012-03-16 14:31:59 +01:00
|
|
|
for app in settings.INSTALLED_APPS:
|
|
|
|
try:
|
|
|
|
mod = import_module(app + '.views')
|
|
|
|
except ImportError:
|
|
|
|
continue
|
|
|
|
appname = mod.__name__.split('.')[0]
|
|
|
|
try:
|
|
|
|
urlpatterns += patterns('', url(
|
|
|
|
r'^%s/$' % appname,
|
|
|
|
mod.Config.as_view(),
|
|
|
|
name='config_%s' % appname,
|
|
|
|
))
|
|
|
|
except AttributeError:
|
|
|
|
continue
|
2012-02-15 12:04:11 +01:00
|
|
|
|