File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/django/contrib/messages/storage/__pycache__/fallback.cpython-310.pyc
Back
o �h- � @ s8 d dl mZ d dlmZ d dlmZ G dd� de�ZdS )� )�BaseStorage)� CookieStorage)�SessionStoragec s8 e Zd ZdZeefZ� fdd�Zdd� Zdd� Z � Z S )�FallbackStoragezu Try to store all messages in the first backend. Store any unstored messages in each subsequent backend. c s6 t � j� i ��� � �fdd�| jD �| _t� | _d S )Nc s g | ] }|� i ����qS � r )�.0� storage_class��args�kwargsr �^/usr/local/CyberPanel/lib/python3.10/site-packages/django/contrib/messages/storage/fallback.py� <listcomp> s �z,FallbackStorage.__init__.<locals>.<listcomp>)�super�__init__�storage_classes�storages�set�_used_storages)�selfr r �� __class__r r r s �zFallbackStorage.__init__c O s^ g }| j D ]%}|�� \}}|du r ||fS |r| j�|� |�|� |r* ||fS q||fS )zJ Get a single list of messages from all storage backends. N)r �_getr �add�extend)r r r �all_messages�storage�messages� all_retrievedr r r r s � �zFallbackStorage._getc O sH | j D ]}|r|j||dd�}q|| jv r!|�g |� | j�|� q|S )z� Store the messages and return any unstored messages after trying all backends. For each storage backend, any messages not stored are passed on to the next backend. F)� remove_oldest)r �_storer �remove)r r �responser r r r r r r ( s �zFallbackStorage._store)�__name__� __module__�__qualname__�__doc__r r r r r r � __classcell__r r r r r s r N)�$django.contrib.messages.storage.baser �&django.contrib.messages.storage.cookier �'django.contrib.messages.storage.sessionr r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings