class missing.views.EnsureCsrfCookieMixin

Mixin for Django class-based views which forces a view to send the CSRF cookie.

This is useful when using Ajax-based sites which do not have an HTML form with a csrf_token that would cause the required CSRF cookie to be sent.

missing.views.forbidden_view(request, reason='')

Displays 403 forbidden page. For example, when request fails CSRF protection.

Similar to Django built-in view, but using template and request context. You can configure Django to use by adding to

handler403 = 'missing.views.forbidden_view'

and to

CSRF_FAILURE_VIEW = 'missing.views.forbidden_view'