3
(h                 @   sX   d dl mZ d dlmZ d dlmZmZ d dlmZ	 G dd deZ
G dd deZd	S )
    )unicode_literals)forms)AuthenticationFormPasswordChangeForm)ugettext_lazyc               @   s(   e Zd ZdZdediZdZdd Zd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             C   s2   |j  s|j r.tj| jd dd| jjidd S )Nr   username)codeparams)Z	is_activeZis_staffr   ZValidationErrorerror_messagesZusername_fieldZverbose_name)selfuser r   >/tmp/pip-install-q3hcpn_q/Django/django/contrib/admin/forms.pyconfirm_login_allowed   s
    z-AdminAuthenticationForm.confirm_login_allowedN)__name__
__module____qualname____doc___r   required_css_classr   r   r   r   r   r      s
   r   c               @   s   e Zd ZdZdS )AdminPasswordChangeFormr	   N)r   r   r   r   r   r   r   r   r      s   r   N)
__future__r   Zdjangor   Zdjango.contrib.auth.formsr   r   Zdjango.utils.translationr   r   r   r   r   r   r   r   <module>   s
   