https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/django/contrib/auth/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/django/contrib/auth/__pycache__/base_user.cpython-310.pyc
o

3�a��@s�dZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZddlmZGd	d
�d
ej�ZGdd�dej�ZdS)
zg
This module allows importing AbstractBaseUser even when django.contrib.auth is
not in INSTALLED_APPS.
�N)�settings)�password_validation)�check_password�is_password_usable�
make_password)�models)�get_random_string�salted_hmac)�gettext_lazyc@s.eZdZedd��Z		d
dd�Zdd�Zd	S)�BaseUserManagercCsJ|pd}z|���dd�\}}Wn
tyY|Sw|d|��}|S)zS
        Normalize the email address by lowercasing the domain part of it.
        ��@�)�strip�rsplit�
ValueError�lower)�cls�email�
email_name�domain_part�r�?/usr/lib/python3/dist-packages/django/contrib/auth/base_user.py�normalize_emails�zBaseUserManager.normalize_email�
�7abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789cCs
t||�S)z�
        Generate a random password with the given length and given
        allowed_chars. The default value of allowed_chars does not have "I" or
        "O" or letters and digits that look similar -- just to avoid confusion.
        )r)�self�length�
allowed_charsrrr�make_random_password!s
	z$BaseUserManager.make_random_passwordcCs|jdi|jj|i��S)Nr)�get�model�USERNAME_FIELD)r�usernamerrr�get_by_natural_key,sz"BaseUserManager.get_by_natural_keyN)rr)�__name__�
__module__�__qualname__�classmethodrrr$rrrrrs


�rcs�eZdZejed�dd�Zejed�ddd�ZdZ	gZ
dZGdd	�d	�Zd
d�Z
�fdd
�Zdd�Zdd�Zdd�Zedd��Zedd��Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zed$d%��Zed&d'��Z�ZS)(�AbstractBaseUser�password�)�
max_lengthz
last loginT)�blank�nullNc@seZdZdZdS)zAbstractBaseUser.MetaTN)r%r&r'�abstractrrrr�Meta<sr0cCs|��S�N��get_username�rrrr�__str__?szAbstractBaseUser.__str__cs8t�j|i|��|jdurt�|j|�d|_dSdSr1)�super�save�	_passwordr�password_changed)r�args�kwargs��	__class__rrr7Bs


�zAbstractBaseUser.savecCst||j�S)z"Return the username for this User.)�getattrr"r4rrrr3HszAbstractBaseUser.get_usernamecCst||j|�|����dSr1)�setattrr"�normalize_usernamer3r4rrr�cleanLszAbstractBaseUser.cleancCs
|��fSr1r2r4rrr�natural_keyOs
zAbstractBaseUser.natural_keycC�dS)zj
        Always return False. This is a way of comparing User objects to
        anonymous users.
        Frr4rrr�is_anonymousR�zAbstractBaseUser.is_anonymouscCrC)zt
        Always return True. This is a way to tell if the user has been
        authenticated in templates.
        Trr4rrr�is_authenticatedZrEz!AbstractBaseUser.is_authenticatedcCst|�|_||_dSr1)rr*r8)r�raw_passwordrrr�set_passwordbs

zAbstractBaseUser.set_passwordcs�fdd�}t|�j|�S)z~
        Return a boolean of whether the raw_password was correct. Handles
        hashing formats behind the scenes.
        cs"��|�d�_�jdgd�dS)Nr*)�
update_fields)rHr8r7)rGr4rr�setterks
z/AbstractBaseUser.check_password.<locals>.setter)rr*)rrGrJrr4rrfszAbstractBaseUser.check_passwordcCstd�|_dSr1)rr*r4rrr�set_unusable_passwordrsz&AbstractBaseUser.set_unusable_passwordcCs
t|j�S)zX
        Return False if set_unusable_password() has been called for this user.
        )rr*r4rrr�has_usable_passwordvs
z$AbstractBaseUser.has_usable_passwordcCsd}t||jdd���S)N�Adjango.contrib.auth.models.AbstractBaseUser.get_session_auth_hash�sha1��	algorithm)r	r*�	hexdigest�r�key_saltrrr�_legacy_get_session_auth_hash|sz.AbstractBaseUser._legacy_get_session_auth_hashcCsd}t||jtjd���S)z7
        Return an HMAC of the password field.
        rMrO)r	r*r�DEFAULT_HASHING_ALGORITHMrQrRrrr�get_session_auth_hash�s��z&AbstractBaseUser.get_session_auth_hashcCsz|jWStyYdSw)Nr)�EMAIL_FIELD�AttributeError)rrrr�get_email_field_name�s
�z%AbstractBaseUser.get_email_field_namecCst|t�rt�d|�S|S)N�NFKC)�
isinstance�str�unicodedata�	normalize)rr#rrrr@�sz#AbstractBaseUser.normalize_username)r%r&r'r�	CharField�_r*�
DateTimeField�
last_login�	is_active�REQUIRED_FIELDSr8r0r5r7r3rArB�propertyrDrFrHrrKrLrTrVr(rYr@�
__classcell__rrr<rr)0s4


r))�__doc__r]�django.confr�django.contrib.authr�django.contrib.auth.hashersrrr�	django.dbr�django.utils.cryptorr	�django.utils.translationr
r`�Managerr�Modelr)rrrr�<module>s

https://t.me/RX1948 - 2025