
    h                         S SK Jr  S SKJr  Sr " S S\5      rSS jrS rS r	S	 r
SS
 jrSS jrSS jrSS jrSS jrg)    )	constants)default_storage)
add_messageget_messages	get_level	set_leveldebuginfosuccesswarningerrorMessageFailurec                       \ rS rSrSrg)r       N)__name__
__module____qualname____firstlineno____static_attributes__r       M/var/www/html/env/lib/python3.13/site-packages/django/contrib/messages/api.pyr   r      s    r   r   c                      U R                   nUR                  XU5      $ ! [         aH    [        U S5      (       d"  [	        SU R
                  R                  -  5      eU(       d  [        S5      e gf = f)zC
Attempt to add a message to the request using the 'messages' app.
METAz?add_message() argument must be an HttpRequest object, not '%s'.z_You cannot add messages without installing django.contrib.messages.middleware.MessageMiddlewareN)	_messagesaddAttributeErrorhasattr	TypeError	__class__r   r   )requestlevelmessage
extra_tagsfail_silentlymessagess         r   r   r      s    8$$ ||EJ77  
w''!++445   G  
s     AA21A2c                     [        U S/ 5      $ )zY
Return the message storage on the request if it exists, otherwise return
an empty list.
r   )getattr)r!   s    r   r   r   +   s    
 7K,,r   c                 F    [        U S[        U 5      5      nUR                  $ )z
Return the minimum level of messages to be recorded.

The default level is the ``MESSAGE_LEVEL`` setting. If this is not found,
use the ``INFO`` level.
r   )r(   r   r"   )r!   storages     r   r   r   3   s!     g{OG,DEG==r   c                 H    [        U S5      (       d  gXR                  l        g)z
Set the minimum level of messages to be recorded, and return ``True`` if
the level was recorded successfully.

If set to ``None``, use the default level (see the get_level() function).
r   FT)r   r   r"   )r!   r"   s     r   r   r   >   s#     7K((#r   c                 :    [        U [        R                  UUUS9  g)z'Add a message with the ``DEBUG`` level.r$   r%   N)r   r   DEBUGr!   r#   r$   r%   s       r   r	   r	   K       #r   c                 :    [        U [        R                  UUUS9  g)z&Add a message with the ``INFO`` level.r-   N)r   r   INFOr/   s       r   r
   r
   V   s    #r   c                 :    [        U [        R                  UUUS9  g)z)Add a message with the ``SUCCESS`` level.r-   N)r   r   SUCCESSr/   s       r   r   r   a       #r   c                 :    [        U [        R                  UUUS9  g)z)Add a message with the ``WARNING`` level.r-   N)r   r   WARNINGr/   s       r   r   r   l   r5   r   c                 :    [        U [        R                  UUUS9  g)z'Add a message with the ``ERROR`` level.r-   N)r   r   ERRORr/   s       r   r   r   w   r0   r   N) F)django.contrib.messagesr   django.contrib.messages.storager   __all__	Exceptionr   r   r   r   r   r	   r
   r   r   r   r   r   r   <module>r?      sK    - ;	Y 	8*-
r   