OpenSlides/openslides/urls.py
Oskar Hahn 1969416e64 Implemented auth via AngularJS
Also added the derective osPerms to check if the current user has permissions.
Removed old Django views and urls for user.
Created utils.views.APIView which should be used instead of the AjaxView.

Fixes: #1470
Fixes: #1454
2015-02-16 11:42:48 +01:00

60 lines
1.7 KiB
Python

from django.conf.urls import include, patterns, url
from openslides.core.views import IndexView, ErrorView
from openslides.utils.rest_api import router
from openslides.users.views import UserSettingsView, UserPasswordSettingsView
handler403 = ErrorView.as_view(status_code=403)
handler404 = ErrorView.as_view(status_code=404)
handler500 = ErrorView.as_view(status_code=500)
urlpatterns = patterns(
'',
url(r'^rest/', include(router.urls)),
(r'^users/', include('openslides.users.urls')),
url(r'^users.*', IndexView.as_view()),
# activate next line go get more angular views
# url(r'^$', IndexView.as_view()),
# url(r'^assignment.*', IndexView.as_view()),
# url(r'^agenda.*', IndexView.as_view()),
)
# Deprecated.
js_info_dict = {'packages': []}
urlpatterns += patterns(
'',
(r'^agenda/', include('openslides.agenda.urls')),
(r'^motion/', include('openslides.motion.urls')),
(r'^assignment/', include('openslides.assignment.urls')),
(r'^mediafile/', include('openslides.mediafile.urls')),
(r'^config/', include('openslides.config.urls')),
(r'^projector/', include('openslides.projector.urls')),
(r'^i18n/', include('django.conf.urls.i18n')),
(r'^ckeditor/', include('ckeditor.urls')),
)
# TODO: move this patterns into core or the participant app
urlpatterns += patterns(
'',
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
url(r'^myusersettings/$',
UserSettingsView.as_view(),
name='user_settings'),
url(r'^myusersettings/changepassword/$',
UserPasswordSettingsView.as_view(),
name='password_change'),
)
urlpatterns += patterns(
'',
(r'^', include('openslides.core.urls')),
)