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__/checks.cpython-310.pyc
o

�aN �@s`ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZd
d	d
�Zd
dd�Z
dS)�)�chain)�
MethodType)�apps)�settings)�checks�)�_get_builtin_permissionsNcs||durt�tj��ntj�d�\}}|D]}|j|kr#|�|��nqgSg}t�jtt	f�s;|�
tjd�dd���j
�jvrS|�
tjdd�j
�j
f�dd���j��j
�js�t�fd	d
��jjD��s�tjdgkr�|�
tjd�jj�j
f�d
d��n|�
tjd�jj�j
fd�dd��t��jt�r�|�
tjd��dd��t��jt�r�|�
tjd��dd��|S)N�.z*'REQUIRED_FIELDS' must be a list or tuple.z	auth.E001��obj�idzjThe field named as the 'USERNAME_FIELD' for a custom user model must not be included in 'REQUIRED_FIELDS'.zaThe 'USERNAME_FIELD' is currently set to '%s', you should remove '%s' from the 'REQUIRED_FIELDS'.z	auth.E002)�hintrrc3s�|]
}|j�jfkVqdS�N)�fields�USERNAME_FIELD)�.0�
constraint��cls��</usr/lib/python3/dist-packages/django/contrib/auth/checks.py�	<genexpr>7s
��
�z#check_user_model.<locals>.<genexpr>z)django.contrib.auth.backends.ModelBackendzC'%s.%s' must be unique because it is named as the 'USERNAME_FIELD'.z	auth.E003z?'%s.%s' is named as the 'USERNAME_FIELD', but it is not unique.zKEnsure that your authentication backend(s) can handle non-unique usernames.z	auth.W004z�%s.is_anonymous must be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!z	auth.C009z�%s.is_authenticated must be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!z	auth.C010)r�	get_modelr�AUTH_USER_MODEL�split�label�
isinstance�REQUIRED_FIELDS�list�tuple�appendr�Errorr�_meta�	get_field�unique�any�total_unique_constraints�AUTHENTICATION_BACKENDS�object_name�Warning�is_anonymousr�Critical�is_authenticated)�app_configs�kwargs�	app_label�
model_name�
app_config�errorsrrr�check_user_models�

���	
�����
���

������	���	r3c	Ks�|dur	t��}n
t�dd�|D��}t�dd�}|j�d�j}|j�d�j}g}|D]�}|j}tt	|��}	|	rCt
dd�|	��D��nd}
|
|krc||
t|j
�}|�tjd	|j||f|d
d��|	rpt
dd�|	��D��nd}||kr�||t|j�}
|�tjd
|j|
|f|dd��t�}|jD]`\}}t|�|kr�|�tjd||j|f|dd��t|�|kr�|�tjd||j|f|dd��||	vr�|�tjd||jf|dd��n||vr�|�tjd||jf|dd��|�|�q�q+|S)Ncss�|]}|��VqdSr)�
get_models)rr1rrrrm��z+check_models_permissions.<locals>.<genexpr>�auth�
Permission�name�codenamecs��|]}t|�VqdSr��len)rr8rrrryr5rzzThe verbose_name of model '%s' must be at most %d characters for its builtin permission names to be at most %d characters.z	auth.E007r
csr:rr;)rr9rrrr�r5zvThe name of model '%s' must be at most %d characters for its builtin permission codenames to be at most %d characters.z	auth.E011zEThe permission named '%s' of model '%s' is longer than %d characters.z	auth.E008zIThe permission codenamed '%s' of model '%s' is longer than %d characters.z	auth.E012zOThe permission codenamed '%s' clashes with a builtin permission for model '%s'.z	auth.E005z;The permission codenamed '%s' is duplicated for model '%s'.z	auth.E006)rr4r�
from_iterablerr"r#�
max_length�dictr�max�valuesr<�verbose_name_rawr rr!r�keysr0�set�permissions�add)r-r.�modelsr7�permission_name_max_length�permission_codename_max_lengthr2�model�opts�builtin_permissions�"max_builtin_permission_name_length�verbose_name_max_length�&max_builtin_permission_codename_length�model_name_max_length�	codenamesr9r8rrr�check_models_permissionsis�
��������������
��������
�������0rRr)�	itertoolsr�typesr�django.appsr�django.confr�django.corer�
managementrr3rRrrrr�<module>s
^

https://t.me/RX1948 - 2025