Fix invalid redirect on unauthorized access to team app

pull/1/head
Luca 3 years ago
parent d6cb71f804
commit d52461205d

@ -14,7 +14,7 @@ def index(request):
pass
@login_required
@login_required(login_url="/admin/login/")
def shift_overview(request):
context = {}
context["running_shifts"] = [
@ -44,7 +44,7 @@ def add_helper_shift(self):
pass
@login_required()
@login_required(login_url="/admin/login/")
def shift_detail(request, pk):
shift = get_object_or_404(Shift, pk=pk)
form = HelperShift()
@ -75,11 +75,13 @@ def shift_detail(request, pk):
class HelperDetail(LoginRequiredMixin, DetailView):
login_url = "/admin/login/"
template_name = "helper_detail.html"
model = Helper
class ShiftList(LoginRequiredMixin, ListView):
login_url = "/admin/login/"
template_name = "shift_list.html"
model = Shift
title = "Alle Schichten"

Loading…
Cancel
Save