diff --git a/openslides/agenda/urls.py b/openslides/agenda/urls.py index 529ce86a0..7c7770122 100644 --- a/openslides/agenda/urls.py +++ b/openslides/agenda/urls.py @@ -13,7 +13,7 @@ from django.conf.urls.defaults import * from agenda.views import Overview, View, SetActive, SetClosed, ItemUpdate, ItemCreate, ItemDelete, ItemPDF -urlpatterns = patterns('agenda.views', +urlpatterns = patterns('', url(r'^$', Overview.as_view(), name='item_overview', diff --git a/openslides/application/urls.py b/openslides/application/urls.py index b51f33967..da779d6b0 100644 --- a/openslides/application/urls.py +++ b/openslides/application/urls.py @@ -15,82 +15,125 @@ from django.utils.translation import ugettext as _ from application.views import ViewPoll, ActivatePoll - urlpatterns = patterns('application.views', - url(r'^application/$', 'overview', \ - name='application_overview'), + url(r'^$', + 'overview', + name='application_overview', + ), - url(r'^application/(?P\d+)/$', 'view', \ - name='application_view'), + url(r'^(?P\d+)/$', + 'view', + name='application_view', + ), - url(r'^application/(?P\d+)/newest/$', 'view', {'newest': True}, \ - name='application_view_newest'), + url(r'^(?P\d+)/newest/$', + 'view', + {'newest': True}, + name='application_view_newest', + ), - url(r'^application/new/$', 'edit', \ - name='application_new'), + url(r'^new/$', + 'edit', + name='application_new', + ), - url(r'^application/import/$', 'application_import', \ - name='application_import'), + url(r'^import/$', + 'application_import', + name='application_import', + ), - url(r'^application/(?P\d+)/edit/$', 'edit', \ - name='application_edit'), + url(r'^(?P\d+)/edit/$', + 'edit', + name='application_edit', + ), - url(r'^application/(?P\d+)/del/$', 'delete', \ - name='application_delete'), + url(r'^(?P\d+)/del/$', + 'delete', + name='application_delete', + ), - url(r'^application/(?P\d+)/setnumber/$', 'set_number', \ - name='application_set_number'), + url(r'^(?P\d+)/setnumber/$', + 'set_number', + name='application_set_number', + ), - url(r'^application/(?P\d+)/setstatus/' \ - '(?P[a-z]{3})/$', 'set_status', \ - name='application_set_status'), + url(r'^(?P\d+)/setstatus/' '(?P[a-z]{3})/$', + 'set_status', + name='application_set_status', + ), - url(r'^application/(?P\d+)/permit/$', 'permit', \ - name='application_permit'), + url(r'^(?P\d+)/permit/$', + 'permit', + name='application_permit', + ), - url(r'^application/version/(?P\d+)/permit/$', 'permit_version', \ - name='application_version_permit'), + url(r'^version/(?P\d+)/permit/$', + 'permit_version', + name='application_version_permit', + ), - url(r'^application/version/(?P\d+)/reject/$', 'reject_version', \ - name='application_version_reject'), + url(r'^version/(?P\d+)/reject/$', + 'reject_version', + name='application_version_reject', + ), - url(r'^application/(?P\d+)/notpermit/$', 'notpermit', \ - name='application_notpermit'), + url(r'^(?P\d+)/notpermit/$', + 'notpermit', + name='application_notpermit', + ), - url(r'^application/(?P\d+)/reset/$', 'reset', \ - name='application_reset'), + url(r'^(?P\d+)/reset/$', + 'reset', + name='application_reset', + ), - url(r'^application/(?P\d+)/support/$', 'support', \ - name='application_support'), + url(r'^(?P\d+)/support/$', + 'support', + name='application_support', + ), - url(r'^application/(?P\d+)/unsupport/$', 'unsupport', \ - name='application_unsupport'), + url(r'^(?P\d+)/unsupport/$', + 'unsupport', + name='application_unsupport', + ), - url(r'^application/(?P\d+)/set_active/$', 'set_active', - name='application_activate_item'), + url(r'^(?P\d+)/set_active/$', + 'set_active', + name='application_activate_item', + ), - url(r'^application/(?P\d+)/gen_poll/$', 'gen_poll', \ - name='application_gen_poll'), + url(r'^(?P\d+)/gen_poll/$', + 'gen_poll', + name='application_gen_poll', + ), - url(r'^application/print/$', 'print_application', \ - name='print_applications'), + url(r'^print/$', + 'print_application', + name='print_applications', + ), - url(r'^application/(?P\d+)/print/$', 'print_application', \ - name='print_application'), + url(r'^(?P\d+)/print/$', + 'print_application', + name='print_application', + ), - url(r'^application/poll/(?P\d+)/print/$', 'print_application_poll', \ - name='print_application_poll'), + url(r'^poll/(?P\d+)/print/$', + 'print_application_poll', + name='print_application_poll', + ), - url(r'^application/poll/(?P\d+)/$', + url(r'^poll/(?P\d+)/$', ViewPoll.as_view(), name='application_poll_view', ), - url(r'^application/poll/(?P\d+)/activate/$', + url(r'^poll/(?P\d+)/activate/$', ActivatePoll.as_view(), name='application_poll_activate', ), - url(r'^application/poll/(?P\d+)/del/$', 'delete_poll', \ - name='application_poll_delete'), + url(r'^poll/(?P\d+)/del/$', + 'delete_poll', + name='application_poll_delete', + ), ) diff --git a/openslides/assignment/urls.py b/openslides/assignment/urls.py index c5e07120a..41f49ec4b 100644 --- a/openslides/assignment/urls.py +++ b/openslides/assignment/urls.py @@ -15,65 +15,106 @@ from django.conf.urls.defaults import * from assignment.views import ViewPoll #, ActivatePoll urlpatterns = patterns('assignment.views', - url(r'^assignment/$', 'get_overview', \ - name='assignment_overview'), - - url(r'^assignment/(?P\d+)$', 'view', \ - name='assignment_view'), - - url(r'^assignment/new$', 'edit', \ - name='assignment_new'), - - url(r'^assignment/(?P\d+)/edit$', 'edit', \ - name='assignment_edit'), - - url(r'^assignment/(?P\d+)/del$', 'delete', \ - name='assignment_delete'), - - url(r'^assignment/(?P\d+)/setstatus/(?P[a-z]{3})$', 'set_status', \ - name='assignment_set_status'), - - url(r'^assignment/(?P\d+)/run$', 'run', \ - name='assignment_run'), - - url(r'^assignment/(?P\d+)/delrun$', 'delrun', \ - name='assignment_delrun'), - - url(r'^assignment/(?P\d+)/delother/(?P\d+)$', 'delother', \ - name='assignment_delother'), - - url(r'^assignment/(?P\d+)/set_active/$', 'set_active', - name='assignment_activate_item'), - - url(r'^assignment/poll/(?P\d+)/print$', 'print_assignment_poll', \ - name='print_assignment_poll'), - - url(r'^assignment/print$', 'print_assignment', \ - name='print_assignment'), - - url(r'^assignment/(?P\d+)/print$', 'print_assignment', \ - name='print_assignment'), - - url(r'^assignment/(?P\d+)/gen_poll$', 'gen_poll', \ - name='assignment_gen_poll'), - - url(r'^assignment/poll/(?P\d+)$', - ViewPoll.as_view(), - name='assignment_poll_view' + url(r'^$', + 'get_overview', + name='assignment_overview', ), - url(r'^assignment/poll/(?P\d+)/del$', 'delete_poll', \ - name='assignment_poll_delete'), + url(r'^(?P\d+)$', + 'view', + name='assignment_view'), - url(r'^assignment/poll/(?P\d+)/pub/$', 'set_published', {'published': True}, - name='assignment_poll_publish'), + url(r'^new$', + 'edit', + name='assignment_new', + ), - url(r'^assignment/poll/(?P\d+)/notpub/$', 'set_published', {'published': False}, - name='assignment_poll_notpublish'), + url(r'^(?P\d+)/edit$', + 'edit', + name='assignment_edit', + ), - url(r'^assignment/(?P\d+)/elected/(?P\d+)$', 'set_elected', {'elected': True}, \ - name='assignment_user_elected'), + url(r'^(?P\d+)/del$', + 'delete', + name='assignment_delete', + ), - url(r'^assignment/(?P\d+)/notelected/(?P\d+)$', 'set_elected', {'elected': False}, \ - name='assignment_user_not_elected'), + url(r'^(?P\d+)/setstatus/(?P[a-z]{3})$', + 'set_status', + name='assignment_set_status', + ), + + url(r'^(?P\d+)/run$', + 'run', + name='assignment_run', + ), + + url(r'^(?P\d+)/delrun$', + 'delrun', + name='assignment_delrun', + ), + + url(r'^(?P\d+)/delother/(?P\d+)$', + 'delother', + name='assignment_delother', + ), + + url(r'^(?P\d+)/set_active/$', + 'set_active', + name='assignment_activate_item', + ), + + url(r'^poll/(?P\d+)/print$', + 'print_assignment_poll', + name='print_assignment_poll', + ), + + url(r'^print$', + 'print_assignment', + name='print_assignment', + ), + + url(r'^(?P\d+)/print$', + 'print_assignment', + name='print_assignment', + ), + + url(r'^(?P\d+)/gen_poll$', + 'gen_poll', + name='assignment_gen_poll', + ), + + url(r'^poll/(?P\d+)$', + ViewPoll.as_view(), + name='assignment_poll_view', + ), + + url(r'^poll/(?P\d+)/del$', + 'delete_poll', + name='assignment_poll_delete', + ), + + url(r'^poll/(?P\d+)/pub/$', + 'set_published', + {'published': True}, + name='assignment_poll_publish', + ), + + url(r'^poll/(?P\d+)/notpub/$', + 'set_published', + {'published': False}, + name='assignment_poll_notpublish', + ), + + url(r'^(?P\d+)/elected/(?P\d+)$', + 'set_elected', + {'elected': True}, + name='assignment_user_elected', + ), + + url(r'^(?P\d+)/notelected/(?P\d+)$', + 'set_elected', + {'elected': False}, + name='assignment_user_not_elected', + ), ) diff --git a/openslides/participant/urls.py b/openslides/participant/urls.py index e7665dd69..5284b0bb2 100644 --- a/openslides/participant/urls.py +++ b/openslides/participant/urls.py @@ -14,35 +14,103 @@ from django.conf.urls.defaults import * from django.core.urlresolvers import reverse urlpatterns = patterns('participant.views', - url(r'^participant/$', 'get_overview', name='user_overview'), - url(r'^participant/new$', 'edit', name='user_new'), - url(r'^participant/(?P\d+)/edit$', 'edit', name='user_edit'), - url(r'^participant/print$', 'print_userlist', name='user_print'), - url(r'^participant/(?P\d+)/del$', 'user_delete', name='user_delete'), - url(r'^participant/(?P\d+)/active/$', 'user_set_active', {'active': True}, name='user_active'), - url(r'^participant/(?P\d+)/inactive/$', 'user_set_active', {'active': False}, name='user_inactive'), - url(r'^participant/(?P\d+)/superuser/$', 'user_set_superuser', {'superuser': True}, name='user_superuser'), - url(r'^participant/(?P\d+)/normaluser/$', 'user_set_superuser', {'superuser': False}, name='user_normaluser'), + url(r'^$', + 'get_overview', + name='user_overview', + ), - url(r'^participant/import$', 'user_import', name='user_import'), - url(r'^participant/group/$', 'get_group_overview', name='user_group_overview'), - url(r'^participant/group/new$', 'group_edit', name='user_group_new'), - url(r'^participant/group/(?P\d+)/edit$', 'group_edit', name='user_group_edit'), - url(r'^participant/group/(?P\d+)/del$', 'group_delete', name='user_group_delete'), - url(r'^user/settings$', 'user_settings', name='user_settings'), - url(r'^participant/resetpassword/(?P\d+)$', 'reset_password', name='user_reset_password'), - url(r'^participant/passwords/print$', 'print_passwords', name='print_passwords'), + url(r'^new$', + 'edit', + name='user_new', + ), + + url(r'^(?P\d+)/edit$', + 'edit', + name='user_edit', + ), + + url(r'^print$', + 'print_userlist', + name='user_print', + ), + + url(r'^(?P\d+)/del$', + 'user_delete', + name='user_delete', + ), + + url(r'^(?P\d+)/active/$', + 'user_set_active', + {'active': True}, + name='user_active', + ), + + url(r'^(?P\d+)/inactive/$', + 'user_set_active', + {'active': False}, + name='user_inactive', + ), + + url(r'^(?P\d+)/superuser/$', + 'user_set_superuser', + {'superuser': True}, + name='user_superuser', + ), + + url(r'^(?P\d+)/normaluser/$', + 'user_set_superuser', + {'superuser': False}, + name='user_normaluser', + ), + + url(r'^import$', + 'user_import', + name='user_import', + ), + + url(r'^group/$', + 'get_group_overview', + name='user_group_overview', + ), + + url(r'^group/new$', + 'group_edit', + name='user_group_new', + ), + + url(r'^group/(?P\d+)/edit$', + 'group_edit', + name='user_group_edit', + ), + + url(r'^group/(?P\d+)/del$', + 'group_delete', + name='user_group_delete', + ), + + url(r'^user/settings$', + 'user_settings', + name='user_settings', + ), + + url(r'^resetpassword/(?P\d+)$', + 'reset_password', + name='user_reset_password', + ), + + url(r'^passwords/print$', + 'print_passwords', + name='print_passwords', + ), ) urlpatterns += patterns('django.contrib.auth.views', - url( - r'^login/$', + url(r'^login/$', 'login', {'template_name': 'participant/login.html'}, name='user_login', ), - url( - r'^logout/$', + url(r'^logout/$', 'logout_then_login', name='user_logout', ) diff --git a/openslides/urls.py b/openslides/urls.py index f05478fca..de1181d4e 100644 --- a/openslides/urls.py +++ b/openslides/urls.py @@ -26,9 +26,9 @@ urlpatterns = patterns('', )), (r'^agenda/', include('agenda.urls')), - (r'', include('application.urls')), - (r'', include('participant.urls')), - (r'', include('assignment.urls')), + (r'^application/', include('application.urls')), + (r'^assignment/', include('assignment.urls')), + (r'^participant/', include('participant.urls')), (r'config/', include('system.urls')), (r'projector/', include('projector.urls')), (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}),