
    (ph                      `    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  SSK
Jr  SS	 jrSS
 jrg)    )chain)
MethodType)apps)settings)checks   )_get_builtin_permissionsNc           
        ^ U c%  [         R                  " [        R                  5      mOO[        R                  R	                  S5      u  p#U  H&  nUR
                  U:X  d  M  UR                  U5      m  O   / $ / n[        TR                  [        [        45      (       d%  UR                  [        R                  " STSS95        TR                  TR                  ;   aC  UR                  [        R                  " SSTR                  < STR                  < S3TS	S
95        TR                  R                  TR                  5      R                   (       d  [#        U4S jTR                  R$                   5       5      (       d  [        R&                  S/:X  aM  UR                  [        R                  " STR                  R(                  < STR                  < S3TSS95        OMUR                  [        R*                  " STR                  R(                  < STR                  < S3STSS
95        [        T" 5       R,                  [.        5      (       a(  UR                  [        R0                  " ST-  TSS95        [        T" 5       R2                  [.        5      (       a(  UR                  [        R0                  " ST-  TSS95        U$ )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'.z*The 'USERNAME_FIELD' is currently set to 'z', you should remove 'z' from the 'REQUIRED_FIELDS'.z	auth.E002)hintr   r   c              3   X   >#    U  H  nUR                   TR                  4:H  v   M!     g 7fN)fieldsUSERNAME_FIELD).0
constraintclss     M/var/www/html/venv/lib/python3.13/site-packages/django/contrib/auth/checks.py	<genexpr>#check_user_model.<locals>.<genexpr>7   s-      F<J 	c0022<s   '*z)django.contrib.auth.backends.ModelBackend'z=' must be unique because it is named as the 'USERNAME_FIELD'.z	auth.E003z9' 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errorsr   s         @r   check_user_modelr6      sh   nnX556 ( 8 8 > >s C	%J9, **:6 & IF c))D%=99LL<	
 S000LLU
 ))3+=+=? 
	
 99s11299# F))<<F C C ++70
 
 MM+.99+@+@#BTBTV"	 MMyy,,c.@.@B0 "	 #%$$j11OO:<?@ 	
 #%((*55OO:<?@ 	
 M    c                    U c  [         R                  " 5       nO[        R                  " S U  5       5      n[         R                  " SS5      nUR
                  R                  S5      R                  nUR
                  R                  S5      R                  n/ nU GHU  nUR
                  n[        [        U5      5      n	U	(       a   [        S U	R                  5        5       5      OSn
X:  aO  UU
[        UR                  5      -
  -
  nUR                  [        R                   " SUR"                  X4-  US	S
95        U	(       a   [        S U	R%                  5        5       5      OSnX:  aP  UU[        UR&                  5      -
  -
  nUR                  [        R                   " SUR"                  UU4-  USS
95        [)        5       nUR*                   GH  u  nn[        U5      U:  a5  UR                  [        R                   " SUUR"                  U4-  USS
95        [        U5      U:  a5  UR                  [        R                   " SUUR"                  U4-  USS
95        X;   a9  UR                  [        R                   " SU< SUR"                  < S3USS
95        O=X;   a8  UR                  [        R                   " SU< SUR"                  < S3USS
95        UR-                  U5        GM     GMX     U$ )Nc              3   @   #    U  H  oR                  5       v   M     g 7fr   )
get_models)r   r4   s     r   r   +check_models_permissions.<locals>.<genexpr>o   s      %
6A
!!##ks   auth
Permissionnamecodenamec              3   8   #    U  H  n[        U5      v   M     g 7fr   len)r   r>   s     r   r   r;   }   s     C&BdD		&B   r   zzThe 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   c              3   8   #    U  H  n[        U5      v   M     g 7fr   rA   )r   r?   s     r   r   r;      s     I.H(H.HrC   zvThe 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.E012zThe permission codenamed 'z/' clashes with a builtin permission for model 'z'.z	auth.E005z' is duplicated for model 'z	auth.E006)r   r:   r   from_iterabler   r%   r&   
max_lengthdictr	   maxvaluesrB   verbose_name_rawr#   r   r$   r   keysr3   setpermissionsadd)r0   r1   modelsr=   permission_name_max_lengthpermission_codename_max_lengthr5   modeloptsbuiltin_permissions"max_builtin_permission_name_lengthverbose_name_max_length&max_builtin_permission_codename_lengthmodel_name_max_length	codenamesr?   r>   s                    r   check_models_permissionsrZ   k   s   "$$ %
6A%
 
 5J!+!1!1!;!;F!C!N!N%/%5%5%?%?
%K%V%V"F{{"#;D#AB # C&9&@&@&BCC 	+
 .J&@2S9N9N5OO'# MM* zz#:WX "	 # I.A.F.F.HII 	/
 2R$B6T__9MM%! MM" 

-6 " E	"..NHd4y55LL. ! JJ6 "&
 8}==LL5 % JJ: "&
 .LL8@$**N!&	 &LL)14::?!&	 MM(#e /a H Mr7   r   )	itertoolsr   typesr   django.appsr   django.confr   django.corer   
managementr	   r6   rZ    r7   r   <module>rb      s$          0]@qr7   