|
|
|
|
@ -3,6 +3,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin |
|
|
|
|
# Create your views here. |
|
|
|
|
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): |
|
|
|
|
@ -24,6 +25,8 @@ class ProtectedDetailView(LoginRequiredMixin, DetailView): |
|
|
|
|
class ProtectedFormView(LoginRequiredMixin, FormView): |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
class ProtectedBaseFormView(LoginRequiredMixin, BaseFormView): |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
class Handler404View(TemplateView): |
|
|
|
|
template_name = '404.html' |
|
|
|
|
|