OpenSlides/openslides/urls.py

62 lines
1.8 KiB
Python
Raw Normal View History

2011-07-31 10:46:29 +02:00
# -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import include, patterns, url
from openslides.core.views import ErrorView
from openslides.utils.plugins import get_urlpatterns
2012-04-15 11:24:40 +02:00
handler403 = ErrorView.as_view(status_code=403)
handler404 = ErrorView.as_view(status_code=404)
handler500 = ErrorView.as_view(status_code=500)
2011-07-31 10:46:29 +02:00
urlpatterns = []
js_info_dict = {'packages': []}
for plugin in settings.INSTALLED_PLUGINS:
plugin_urlpatterns = get_urlpatterns(plugin)
if plugin_urlpatterns:
urlpatterns += plugin_urlpatterns
js_info_dict['packages'].append(plugin)
urlpatterns += patterns(
'',
(r'^agenda/', include('openslides.agenda.urls')),
2012-10-24 11:04:23 +02:00
(r'^motion/', include('openslides.motion.urls')),
(r'^assignment/', include('openslides.assignment.urls')),
(r'^participant/', include('openslides.participant.urls')),
(r'^mediafile/', include('openslides.mediafile.urls')),
(r'^config/', include('openslides.config.urls')),
(r'^projector/', include('openslides.projector.urls')),
2011-07-31 10:46:29 +02:00
(r'^i18n/', include('django.conf.urls.i18n')),
(r'^ckeditor/', include('ckeditor.urls')),
2011-07-31 10:46:29 +02:00
)
2011-09-03 19:16:43 +02:00
# TODO: move this patterns into core or the participant app
urlpatterns += patterns(
'',
2012-04-16 11:12:21 +02:00
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
2012-04-14 09:42:30 +02:00
url(r'^login/$',
'openslides.participant.views.login',
name='user_login'),
2012-04-14 09:42:30 +02:00
url(r'^logout/$',
'django.contrib.auth.views.logout_then_login',
name='user_logout'),
2012-07-01 16:56:01 +02:00
url(r'^usersettings/$',
'openslides.participant.views.user_settings',
name='user_settings'),
2012-07-01 16:56:01 +02:00
url(r'^usersettings/changepassword/$',
'openslides.participant.views.user_settings_password',
name='password_change'),
2011-09-03 19:16:43 +02:00
)
urlpatterns += patterns(
'',
(r'^', include('openslides.core.urls')),
)