File: //usr/lib/python3/dist-packages/django/contrib/messages/storage/__pycache__/base.cpython-310.pyc
o
3�a+ � @ sD d dl mZ d dlmZmZ e�� ZG dd� d�ZG dd� d�ZdS )� )�settings)� constants�utilsc @ sJ e Zd ZdZddd�Zdd� Zdd� Zd d
� Zedd� �Z ed
d� �Z
dS )�Messagez�
Represent an actual message that can be stored in any of the supported
storage classes (typically session- or cookie-based) and rendered in a view
or template.
Nc C s t |�| _|| _|| _d S �N)�int�level�message�
extra_tags��selfr r r
� r
�F/usr/lib/python3/dist-packages/django/contrib/messages/storage/base.py�__init__ s
zMessage.__init__c C s0 t | j�| _| jdurt | j�| _dS d| _dS )z�
Prepare the message for serialization by forcing the ``message``
and ``extra_tags`` to str in case they are lazy translations.
N)�strr r
�r r
r
r �_prepare s $zMessage._preparec C s&