add missing login_required mixins to team views
This commit is contained in:
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 .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
|
Loading…
Reference in New Issue