add missing login_required mixins to team views

pull/1/head
parent 08dd614f67
commit 943130fddd

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