Fixed URLs in projector views

This commit is contained in:
Oskar Hahn 2013-02-02 00:26:08 +01:00
parent bd317aed31
commit 0f7d0e349c
2 changed files with 7 additions and 11 deletions

View File

@ -151,7 +151,7 @@ class ActivateView(RedirectView):
Activate a Slide.
"""
permission_required = 'projector.can_manage_projector'
url = 'dashboard'
url_name = 'dashboard'
allow_ajax = True
def pre_redirect(self, request, *args, **kwargs):
@ -209,7 +209,7 @@ class ProjectorEdit(RedirectView):
Scale or scroll the projector.
"""
permission_required = 'projector.can_manage_projector'
url = 'dashboard'
url_name = 'dashboard'
allow_ajax = True
def pre_redirect(self, request, *args, **kwargs):
@ -233,7 +233,7 @@ class CountdownEdit(RedirectView):
Start, stop or reset the countdown.
"""
permission_required = 'projector.can_manage_projector'
url = 'dashboard'
url_name = 'dashboard'
allow_ajax = True
def pre_redirect(self, request, *args, **kwargs):
@ -284,7 +284,7 @@ class OverlayMessageView(RedirectView):
"""
Sets or clears the overlay message
"""
url = 'dashboard'
url_name = 'dashboard'
allow_ajax = True
permission_required = 'projector.can_manage_projector'
@ -305,7 +305,7 @@ class ActivateOverlay(RedirectView):
"""
Activate or deactivate an overlay.
"""
url = 'dashboard'
url_name = 'dashboard'
allow_ajax = True
permission_required = 'projector.can_manage_projector'
@ -341,8 +341,6 @@ class CustomSlideCreateView(CreateView):
template_name = 'projector/new.html'
model = ProjectorSlide
context_object_name = 'customslide'
success_url = 'dashboard'
apply_url = 'customslide_edit'
class CustomSlideUpdateView(UpdateView):
@ -353,8 +351,6 @@ class CustomSlideUpdateView(UpdateView):
template_name = 'projector/new.html'
model = ProjectorSlide
context_object_name = 'customslide'
success_url = 'dashboard'
apply_url = 'customslide_edit'
class CustomSlideDeleteView(DeleteView):
@ -363,7 +359,7 @@ class CustomSlideDeleteView(DeleteView):
"""
permission_required = 'projector.can_manage_projector'
model = ProjectorSlide
url = 'dashboard'
url_name = 'dashboard'
def register_tab(request):

View File

@ -20,7 +20,7 @@ handler500 = 'openslides.utils.views.server_error'
urlpatterns = patterns('',
# Redirect to dashboard URL
url(r'^$', RedirectView.as_view(url='dashboard'), name='home',),
url(r'^$', RedirectView.as_view(url='projector/dashboard'), name='home',),
(r'^agenda/', include('openslides.agenda.urls')),
(r'^motion/', include('openslides.motion.urls')),