File: //usr/lib/python3/dist-packages/django/utils/__pycache__/decorators.cpython-310.pyc
o
3�a� � @ sv d Z ddlmZmZmZ G dd� de�Zdd� Zdd� Zdd
d�Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zdd� ZdS )zCFunctions that help with dynamically creating decorators for views.� )�partial�update_wrapper�wrapsc s e Zd Zd� fdd� Z� ZS )�classonlymethodNc s |d urt d��t� �||�S )Nz=This method is available only on the class, not on instances.)�AttributeError�super�__get__)�self�instance�cls�� __class__� �9/usr/lib/python3/dist-packages/django/utils/decorators.pyr s zclassonlymethod.__get__�N)�__name__�
__module__�__qualname__r �
__classcell__r r r r r s r c C s |dd� �}t | |� d S )Nc _ s d S r r )�args�kwargsr r r �dummy s z%_update_method_wrapper.<locals>.dummy)r )�_wrapper� decoratorr r r r �_update_method_wrapper
s
r c sP t � d�r
� ddd� � n� g� � �fdd�}� D ]}t||� qt|�� |S )z�
Decorate `method` with one or more function decorators. `decorators` can be
a single decorator or an iterable of decorators.
�__iter__N���c s4 t ��| t| ���}� D ]}||�}q||i |��S r )r r �type)r r r �bound_method�dec��
decorators�methodr r r # s
z!_multi_decorate.<locals>._wrapper)�hasattrr r )r! r"