Cleaned up urls.py. Fixed #1472. Removed use of 'django.views.i18n.javascript_catalog'.

This commit is contained in:
Norman Jäckel 2015-02-18 16:07:39 +01:00
parent 74fa2e12f5
commit 1777ac48b6
2 changed files with 5 additions and 14 deletions

View File

@ -142,7 +142,6 @@
<script src="{% static 'js/sockjs-0.3.min.js' %}" type="text/javascript"></script> <script src="{% static 'js/sockjs-0.3.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/utils.js' %}" type="text/javascript"></script> <script src="{% static 'js/utils.js' %}" type="text/javascript"></script>
<script src="{% static 'js/chatbox.js' %}" type="text/javascript"></script> <script src="{% static 'js/chatbox.js' %}" type="text/javascript"></script>
<script src="{% url 'django.views.i18n.javascript_catalog' %}" type="text/javascript"></script>
<script type="text/javascript" src="{% static 'js/jquery/jquery.bsmselect.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery/jquery.bsmselect.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
// use jquery-bsmselect for all <select multiple> form elements // use jquery-bsmselect for all <select multiple> form elements

View File

@ -1,8 +1,8 @@
from django.conf.urls import include, patterns, url from django.conf.urls import include, patterns, url
from openslides.core.views import IndexView, ErrorView from openslides.core.views import IndexView, ErrorView
from openslides.utils.rest_api import router
from openslides.users.views import UserSettingsView, UserPasswordSettingsView from openslides.users.views import UserSettingsView, UserPasswordSettingsView
from openslides.utils.rest_api import router
handler403 = ErrorView.as_view(status_code=403) handler403 = ErrorView.as_view(status_code=403)
handler404 = ErrorView.as_view(status_code=404) handler404 = ErrorView.as_view(status_code=404)
@ -11,22 +11,17 @@ handler500 = ErrorView.as_view(status_code=500)
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url(r'^rest/', include(router.urls)), url(r'^rest/', include(router.urls)),
(r'^users/', include('openslides.users.urls')), url(r'^users/', include('openslides.users.urls')),
url(r'^users.*', IndexView.as_view()), url(r'^users.*', IndexView.as_view()),
# activate next line go get more angular views # Activate next lines to get more AngularJS views
# url(r'^$', IndexView.as_view()), # url(r'^$', IndexView.as_view()),
# url(r'^assignment.*', IndexView.as_view()), # url(r'^assignment.*', IndexView.as_view()),
# url(r'^agenda.*', IndexView.as_view()), # url(r'^agenda.*', IndexView.as_view()),
) )
# Deprecated urls. Move them up when the apps are refactored.
# Deprecated.
js_info_dict = {'packages': []}
urlpatterns += patterns( urlpatterns += patterns(
'', '',
(r'^agenda/', include('openslides.agenda.urls')), (r'^agenda/', include('openslides.agenda.urls')),
@ -39,15 +34,12 @@ urlpatterns += patterns(
(r'^ckeditor/', include('ckeditor.urls')), (r'^ckeditor/', include('ckeditor.urls')),
) )
# TODO: move this patterns into core or the participant app # TODO: Move these patterns into core or the users app.
urlpatterns += patterns( urlpatterns += patterns(
'', '',
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
url(r'^myusersettings/$', url(r'^myusersettings/$',
UserSettingsView.as_view(), UserSettingsView.as_view(),
name='user_settings'), name='user_settings'),
url(r'^myusersettings/changepassword/$', url(r'^myusersettings/changepassword/$',
UserPasswordSettingsView.as_view(), UserPasswordSettingsView.as_view(),
name='password_change'), name='password_change'),