File: //usr/lib/python3/dist-packages/django/template/__pycache__/context_processors.cpython-310.pyc
o
�ah � @ sp d Z ddlZddlmZ ddlmZ ddlmZmZ dd� Z dd � Z
d
d� Zdd
� Zdd� Z
dd� Zdd� ZdS )aR
A set of request processors that return dictionaries to be merged into a
template context. Each function takes the request object as its only parameter
and returns a dictionary to add to the context.
These are referenced from the 'context_processors' option of the configuration
of a DjangoTemplates backend and used by RequestContext.
� N)�settings�� get_token)�SimpleLazyObject�lazyc s � fdd�}dt |�iS )z�
Context processor that provides a CSRF token, or the string 'NOTPROVIDED' if
it has not been provided by either a view decorator or the middleware
c s t � �} | d u r
dS | S )N�NOTPROVIDEDr )�token��request� �D/usr/lib/python3/dist-packages/django/template/context_processors.py�_get_val s zcsrf.<locals>._get_val�
csrf_token)r )r
r
r r r �csrf s
r c sJ i }t jr#| j�d�t jv r#d|d<