OwlCyberSecurity - MANAGER
Edit File: csrf.cpython-39.pyc
a ���e � @ s� d dl mZ d dlmZmZ d dlmZ ee�Zde_de_ G dd� de�Z ee �Zde_d e_ G d d� de�Zee�Z de _d e _ dd� ZdS )� )�wraps)�CsrfViewMiddleware� get_token)�decorator_from_middleware�csrf_protectz� This decorator adds CSRF protection in exactly the same way as CsrfViewMiddleware, but it can be used on a per view basis. Using both, or using the decorator multiple times, is harmless and efficient. c @ s e Zd Zdd� ZdS )�_EnsureCsrfTokenc C s d S �N� ��self�request�reasonr r �]/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/views/decorators/csrf.py�_reject s z_EnsureCsrfToken._rejectN)�__name__� __module__�__qualname__r r r r r r s r �requires_csrf_tokenz� Use this decorator on views that need a correct csrf_token available to RequestContext, but without the CSRF protection that csrf_protect enforces. c s$ e Zd Zdd� Z� fdd�Z� ZS )�_EnsureCsrfCookiec C s d S r r r r r r r s z_EnsureCsrfCookie._rejectc s t � �||||�}t|� |S r )�super�process_viewr )r r �callback� callback_args�callback_kwargs�retval�� __class__r r r "