You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
902 B
45 lines
902 B
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
|
|
from django.views import View
|
|
from django.views.generic import TemplateView, ListView, DetailView, FormView
|
|
from django.views.generic.edit import BaseFormView
|
|
|
|
|
|
class ProtectedView(LoginRequiredMixin, View):
|
|
pass
|
|
|
|
|
|
class ProtectedTemplateView(LoginRequiredMixin, TemplateView):
|
|
pass
|
|
|
|
|
|
class ProtectedListView(LoginRequiredMixin, ListView):
|
|
pass
|
|
|
|
|
|
class ProtectedDetailView(LoginRequiredMixin, DetailView):
|
|
pass
|
|
|
|
|
|
class ProtectedFormView(LoginRequiredMixin, FormView):
|
|
pass
|
|
|
|
|
|
class ProtectedBaseFormView(LoginRequiredMixin, BaseFormView):
|
|
pass
|
|
|
|
|
|
class Handler404View(TemplateView):
|
|
template_name = '404.html'
|
|
|
|
|
|
class Handler500View(TemplateView):
|
|
template_name = '500.html'
|
|
|
|
|
|
class Handler403View(TemplateView):
|
|
template_name = '403.html'
|
|
|
|
|
|
class Handler400View(TemplateView):
|
|
template_name = '400.html'
|
|
|