
    g                     X    d dl mZmZ d dlmZ d dlmZ  G d de      Z G d de      Z	y)	    )AuthenticationFormPasswordChangeForm)ValidationError)gettext_lazyc                   V     e Zd ZdZi ej
                  d ed      iZdZ fdZ xZ	S )AdminAuthenticationFormz=
    A custom authentication form used in the admin app.
    invalid_loginztPlease enter the correct %(username)s and password for a staff account. Note that both fields may be case-sensitive.requiredc                     t         |   |       |j                  s1t        | j                  d   dd| j
                  j                  i      y )Nr	   username)codeparams)superconfirm_login_allowedis_staffr   error_messagesusername_fieldverbose_name)selfuser	__class__s     r/var/www/python.vincentserveurtest.ovh/public_html/venv/lib/python3.12/site-packages/django/contrib/admin/forms.pyr   z-AdminAuthenticationForm.confirm_login_allowed   sN    %d+}}!##O4$"D$7$7$D$DE      )
__name__
__module____qualname____doc__r   r   _required_css_classr   __classcell__)r   s   @r   r   r      sD    

+
+D
N $ r   r   c                       e Zd ZdZy)AdminPasswordChangeFormr
   N)r   r   r   r    r   r   r"   r"      s    #r   r"   N)
django.contrib.auth.formsr   r   django.core.exceptionsr   django.utils.translationr   r   r   r"   r#   r   r   <module>r'      s(    L 2 60 0$0 $r   