django_powerbank.views package¶
Submodules¶
django_powerbank.views.auth module¶
-
class
django_powerbank.views.auth.
AbstractAccessView
(**kwargs)[source]¶ Bases:
django_powerbank.views.ExceptionResponseView
Allows you to handle authorization before dispatch is called
-
class
django_powerbank.views.auth.
AbstractAuthorizedView
(**kwargs)[source]¶ Bases:
django_powerbank.views.auth.AuthenticatedView
-
forbidden_message
= 'You are not authorized to view this page'¶
-
-
django_powerbank.views.auth.
AccessMixin
¶
-
class
django_powerbank.views.auth.
AuthenticatedView
(**kwargs)[source]¶ Bases:
django_powerbank.views.auth.AbstractAccessView
redirects unauthenticated users to login
-
class
django_powerbank.views.auth.
StaffRequiredMixin
(**kwargs)[source]¶ Bases:
django_powerbank.views.auth.AbstractAuthorizedView
django_powerbank.views.generic module¶
django_powerbank.views.mixins module¶
-
class
django_powerbank.views.mixins.
ReturnUrlMx
(**kwargs)[source]¶ Bases:
django.views.generic.base.ContextMixin
,django.views.generic.base.View
Module contents¶
-
exception
django_powerbank.views.
ExceptionResponse
(response)[source]¶ Bases:
Exception
Generic exception for signalling that instead of default error handling we should use attached response
-
class
django_powerbank.views.
ExceptionResponseView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
-
exception
django_powerbank.views.
Http302
(to, *args, **kwargs)[source]¶ Bases:
django_powerbank.views.ExceptionResponse
Wraps a redirect shortcut call into the ResponseException
-
exception
django_powerbank.views.
Http403
(response)[source]¶ Bases:
django.core.exceptions.PermissionDenied
,django_powerbank.views.ExceptionResponse
A convenience wrapper around :py:class:~django.core.exceptions.PermissionDenied`