2
0
Fork 0

add missing login_required mixins to team views

This commit is contained in:
Andreas (@xAndy) Zimmermann 2022-04-13 19:35:21 +02:00
parent 08dd614f67
commit 943130fddd
1 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ from django.db.models.fields import DateTimeField
from django.db.models import F, Count, Q, ExpressionWrapper
from .models import ShiftRegistration, Room, Shift, Helper
from django.views.generic import DetailView, ListView
from django.contrib.auth.mixins import LoginRequiredMixin
# Create your views here.
def index(request):
@ -20,14 +21,14 @@ def shift_overview(request):
return render(request, 'shift_overview.html', context)
class ShiftDetail(DetailView):
class ShiftDetail(LoginRequiredMixin, DetailView):
template_name = "shift_detail.html"
model= Shift
class HelperDetail(DetailView):
class HelperDetail(LoginRequiredMixin, DetailView):
template_name = "helper_detail.html"
model= Helper
class ShiftList(ListView):
class ShiftList(LoginRequiredMixin, ListView):
template_name = "shift_list.html"
model= Shift