2
0
Fork 0

Fix invalid redirect on unauthorized access to team app

This commit is contained in:
Luca 2022-04-28 16:03:54 +02:00
parent d6cb71f804
commit d52461205d
1 changed files with 4 additions and 2 deletions

View File

@ -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"