Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad NameLoad Str Str Assign NameStore Call NameLoad NameLoad Str BinOpMult BinOpMult Num Num Num Assign NameStore Call NameLoad NameLoad Str NameLoad Assign NameStore Str FunctionDef arguments args NameParam defaults body Return Dict Str Call NameLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Return If Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareNotIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad orelse Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str orelse Assign NameStore NameLoad Assign NameStore Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str If NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad Str NameLoad body Return If Call NameLoad NameLoad Str NameLoad body Return If BoolOpAnd Call NameLoad NameLoad Str NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Return If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Return Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad Str NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call NameLoad NameLoad Str Str If UnaryOpNot BoolOpAnd BoolOpOr NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr keyword Call NameLoad keyword Num keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad ListLoad Str Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore UnaryOpNot BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad ListLoad Str Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias identifier Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A CSRF protection without cookies. N/A functools N/A hashlib django.conf settings django.core.cache cache django.middleware csrf django_csrf django.utils crypto django.utils.cache patch_vary_headers N/A ANON_COOKIE N/A getattr settings ANON_COOKIE anoncsrf N/A ANON_TIMEOUT N/A getattr settings ANON_TIMEOUT N/A N/A 60 60 2 N/A ANON_ALWAYS N/A getattr settings ANON_ALWAYS False N/A PREFIX sessioncsrf: context_processor N/A N/A request N/A N/A N/A N/A csrf_token N/A getattr request csrf_token NOTPROVIDED N/A prep_key N/A N/A key N/A N/A N/A 
    In case a bogus request comes in with a large or wrongly formatted
    massive anoncsrf cookie value, memcache will raise a
    MemcachedKeyLengthError or MemcachedKeyCharacterError. We hash the
    key here in order to have a predictable length and character set.
     N/A prefixed N/A PREFIX key N/A N/A N/A N/A N/A hashlib md5 prefixed hexdigest N/A CsrfMiddleware N/A object N/A _accept N/A N/A self request N/A N/A N/A N/A request csrf_processing_done True N/A _reject N/A N/A self request reason N/A N/A N/A N/A N/A N/A django_csrf _get_failure_view request reason N/A process_request N/A N/A self request N/A N/A N/A 
        Add a CSRF token to the session for logged-in users.

        The token is available at request.csrf_token.
         N/A N/A hasattr request csrf_token N/A N/A N/A N/A N/A N/A request user is_authenticated N/A N/A N/A csrf_token N/A request session N/A N/A token N/A N/A django_csrf _get_new_csrf_key N/A N/A request csrf_token N/A N/A request session N/A csrf_token token N/A N/A N/A request csrf_token N/A N/A request session N/A csrf_token N/A N/A key None N/A token N/A N/A ANON_COOKIE N/A request COOKIES N/A N/A key N/A N/A request COOKIES N/A ANON_COOKIE N/A token N/A N/A cache get N/A prep_key key N/A ANON_ALWAYS N/A N/A N/A key N/A N/A key N/A N/A django_csrf _get_new_csrf_key N/A N/A token N/A N/A token N/A N/A django_csrf _get_new_csrf_key N/A N/A request _anon_csrf_key key N/A N/A N/A cache set N/A prep_key key token ANON_TIMEOUT N/A N/A request csrf_token token N/A process_view N/A N/A self request view_func args kwargs N/A N/A N/A Check the CSRF token if this is a POST. N/A N/A getattr request csrf_processing_done False N/A N/A N/A N/A getattr view_func csrf_exempt False N/A N/A N/A N/A N/A getattr view_func anonymous_csrf_exempt False N/A N/A N/A N/A request user is_authenticated N/A N/A N/A N/A N/A request method N/A GET HEAD OPTIONS TRACE N/A N/A N/A N/A self _accept request N/A N/A getattr request _dont_enforce_csrf_checks False N/A N/A N/A N/A self _accept request N/A user_token N/A N/A N/A request POST get csrfmiddlewaretoken N/A N/A user_token N/A N/A user_token N/A N/A N/A request META get HTTP_X_CSRFTOKEN N/A request_token N/A getattr request csrf_token N/A N/A N/A N/A user_token request_token N/A N/A crypto constant_time_compare user_token request_token N/A N/A reason N/A django_csrf REASON_BAD_TOKEN N/A N/A N/A N/A django_csrf logger warning N/A Forbidden (%s): %s N/A reason N/A request path extra N/A dict status_code 403 request request N/A N/A N/A self _reject request reason N/A N/A N/A N/A self _accept request N/A process_response N/A N/A self request response N/A N/A N/A N/A hasattr request _anon_csrf_key N/A N/A N/A N/A response set_cookie ANON_COOKIE N/A request _anon_csrf_key max_age ANON_TIMEOUT httponly True secure N/A N/A request is_secure N/A N/A patch_vary_headers response N/A Cookie N/A response N/A N/A anonymous_csrf N/A N/A f N/A N/A N/A Decorator that assigns a CSRF token to an anonymous user. wrapper N/A N/A request N/A args kw N/A N/A use_anon_cookie N/A N/A N/A N/A N/A request user is_authenticated ANON_ALWAYS N/A use_anon_cookie N/A N/A N/A ANON_COOKIE N/A request COOKIES N/A N/A key N/A N/A request COOKIES N/A ANON_COOKIE N/A token N/A N/A N/A cache get N/A prep_key key N/A N/A django_csrf _get_new_csrf_key N/A N/A key N/A N/A django_csrf _get_new_csrf_key N/A token N/A N/A django_csrf _get_new_csrf_key N/A N/A N/A cache set N/A prep_key key token ANON_TIMEOUT N/A N/A request csrf_token token N/A response N/A f request args kw N/A use_anon_cookie N/A N/A N/A N/A response set_cookie ANON_COOKIE key max_age ANON_TIMEOUT httponly True secure N/A N/A request is_secure N/A N/A patch_vary_headers response N/A Cookie N/A response N/A N/A N/A functools wraps f N/A wrapper N/A anonymous_csrf_exempt N/A N/A f N/A N/A N/A Like @csrf_exempt but only for anonymous requests. N/A N/A f anonymous_csrf_exempt True N/A f N/A monkeypatch N/A N/A N/A N/A django.views.decorators csrf csrf_dec N/A N/A django_csrf CsrfViewMiddleware CsrfMiddleware N/A N/A csrf_dec csrf_protect N/A N/A csrf_dec decorator_from_middleware CsrfMiddleware N/A