class CsrfViewMiddleware(MiddlewareMixin):
Known subclasses: django.views.decorators.csrf._EnsureCsrfCookie
, django.views.decorators.csrf._EnsureCsrfToken
Require a present and correct csrfmiddlewaretoken for POST requests that have a CSRF cookie, and set an outgoing CSRF cookie.
This middleware should be used in conjunction with the {% csrf_token %} template tag.
Method | _accept |
Undocumented |
Method | _bad_token_message |
Undocumented |
Method | _check_referer |
Undocumented |
Method | _check_token |
Undocumented |
Method | _get_token |
Undocumented |
Method | _origin_verified |
Undocumented |
Method | _reject |
Undocumented |
Method | _set_csrf_cookie |
Undocumented |
Method | process_request |
Undocumented |
Method | process_response |
Undocumented |
Method | process_view |
Undocumented |
Property | allowed_origin_subdomains |
A mapping of allowed schemes to list of allowed netlocs, where all subdomains of the netloc are allowed. |
Property | allowed_origins_exact |
Undocumented |
Property | csrf_trusted_origins_hosts |
Undocumented |
Inherited from MiddlewareMixin
:
Async Method | __acall__ |
Async version of __call__ that is swapped in when an async request is running. |
Method | __call__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | _async_check |
If get_response is a coroutine function, turns us into async mode so a thread is not consumed during a whole request. |
Class Variable | async_capable |
Undocumented |
Class Variable | sync_capable |
Undocumented |
Instance Variable | _is_coroutine |
Undocumented |
Instance Variable | get_response |
Undocumented |
django.views.decorators.csrf._EnsureCsrfCookie
, django.views.decorators.csrf._EnsureCsrfToken
Undocumented
django.views.decorators.csrf._EnsureCsrfCookie
Undocumented