+
    Tj5                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^ RIHtHt ^ RIHt ^ R	IHt  ! R
 R]4      tRt ! R R]4      tR# )z*
Management utility to create superusers.
N)get_user_model)get_default_username)validate_password)
exceptions)BaseCommandCommandError)DEFAULT_DB_ALIASconnections)cached_property)capfirstc                       ] tR t^tRtR# )NotRunningInTTYException N)__name__
__module____qualname____firstlineno____static_attributes__r       l/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/auth/management/commands/createsuperuser.pyr   r      s    r   r   passwordc                      a a ] tR t^t oRtRtRtV 3R ltR tV 3R lt	R t
RR ltRR lt]R	 4       tR
 tRtVtV ;t# )CommandzUsed to create a superuser.Tc                   < \         SV `  ! V/ VB  \        4       V n        V P                  P                  P                  V P                  P                  4      V n        R # N)super__init__r   	UserModel_meta	get_fieldUSERNAME_FIELDusername_field)selfargskwargs	__class__s   &*,r   r   Command.__init__   sI    $)&)')"nn22<<NN))
r   c                    VP                  R V P                  P                  ,          RR7       VP                  RRRRRV P                  P                  ,          R7       VP                  R	\        \	        \
        4      R
R7       V P                  P                   F  pV P                  P                  P                  V4      pVP                  '       d   VP                  P                  '       dC   VP                  P                  P                  P                  '       g   \        RV,          4      hVP                  R V,          RRV,          3R7       K  VP                  R V,          RV,          R7       K  	  R# )z--%sz&Specifies the login for the superuser.)helpz	--noinputz
--no-inputstore_falseinteractivezTells Django to NOT prompt the user for input of any kind. You must use --%s with --noinput, along with an option for any other required field. Superusers created with --noinput will not be able to log in until they're given a valid password.)actiondestr(   z
--databasez4Specifies the database to use. Default is "default".)defaultchoicesr(   z\Required field '%s' specifies a many-to-many relation through model, which is not supported.appendz?Specifies the %s for the superuser. Can be used multiple times.)r+   r(   z#Specifies the %s for the superuser.N)add_argumentr   r    r   tupler	   REQUIRED_FIELDSr   r   many_to_manyremote_fieldthroughauto_createdr   )r"   parser
field_namefields   &&  r   add_argumentsCommand.add_arguments&   sj   T^^2229 	 	
 	 N ..//	0 	 	
 	$+&G	 	 	
 ..88JNN((22:>E!!!&&...!..66<<III&JLVW 
 ''+'.0:; (  ##Z'>K $ + 9r   c                n   < VP                  R \        P                  4      V n        \        SV `  ! V/ VB # stdin)getsysr>   r   execute)r"   r#   optionsr%   s   &*,r   rA   Command.executeX   s-    [[#))4
w000r   c                   W P                   P                  ,          pVR ,          p/ pV P                  P                  p V P                   P                  P                  \        4       RV\        &    VR,          '       Ed   / p\        V P                  R4      '       d'   V P                  P                  4       '       g   \        h\        VR7      pV'       d9   V P                  W6V4      p	V	'       d   V P                  P!                  V	4       RpM"VR8X  d   \#        R\%        V4      ,          4      hVf~   V P'                  V P                  V4      p
V P)                  V P                  W4      pV'       g   KF  V P                  W6V4      p	V	'       g   Kb  V P                  P!                  V	4       RpK  W5V P                   P                  &   V P                  P*                  '       d&   V P                  P*                  P-                  V4      MTWpP                   P                  &   V P                   P.                   EFb  pV P                   P                  P                  V4      pW+,          W[&   W[,          e   VP1                  W[,          R4      W[&   W[,          f   V P'                  V4      p
V P)                  W4      pWV&   VP2                  '       g   KD  V'       g   KN  VP5                  4       '       g"   RW[&   V P                  P!                  R4       K  VP7                  R4       Uu. uF  qP5                  4       NK  	  upW[&   K  VP2                  '       g   W[,          W{&   VP8                  '       g   EK?  VP*                  P-                  W[,          4      W{&   EKe  	  \        V9   d   V\        ,          f   \:        P:                  ! 4       p\:        P:                  ! R	4      pVV8w  d   V P                  P!                  R
4       Ki  VP5                  4       R8X  d   V P                  P!                  R4       K   \=        VV P                   ! R/ VB 4       W\        &   K  EMW\        V9   d4   R\H        PJ                  9   d   \H        PJ                  R,          V\        &   VfI   \H        PJ                  PM                  RV P                   P                  PO                  4       ,           4      pVf'   \#        RV P                   P                  ,          4      hV P                  W6V4      p	V	'       d   \#        V	4      hW5V P                   P                  &   V P                   P.                   EFK  pRVPO                  4       ,           pW+,          ;'       g     \H        PJ                  PM                  V4      pV P                   P                  P                  V4      pV'       gX   VPP                  '       d4   W+,          R8X  g%   \H        PJ                  PM                  V4      R8X  d   K  \#        RV,          4      hVP1                  VR4      W[&   VP2                  '       g   K  \S        W[,          \T        4      '       g   EK  W[,          P7                  R4       Uu. uF  qP5                  4       NK  	  upW[&   EKN  	  V P                   PV                  PY                  V4      PZ                  ! R/ VB  VR,          ^8  d   V P\                  P!                  R4       R# R#   \        P                   d     ELi ; iu upi   \        P>                   dg   pT P                  P!                  RPA                  TPB                  4      4       \E        R4      pTPG                  4       R8w  d    Rp?EK   Rp?EL\Rp?ii ; iu upi   \^         d6    T P                  P!                  R4       \`        Pb                  ! ^4        R# \        P>                   d*   p\#        RPA                  TPB                  4      4      hRp?i\         d     T P\                  P!                  R4        R# i ; i)databaseNr*   isatty)rE    %s cannot be blank.z"Error: This field cannot be blank.,zPassword (again): z#Error: Your passwords didn't match.z&Error: Blank passwords aren't allowed.
z:Bypass password validation and create user anyway? [y/N]: yDJANGO_SUPERUSER_PASSWORDDJANGO_SUPERUSER_z!You must use --%s with --noinput.	verbosityzSuperuser created successfully.z
Operation cancelled.; zSuperuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.r   )2r   r    r!   verbose_namer   r   PASSWORD_FIELDr   FieldDoesNotExisthasattrr>   rF   r   r   _validate_usernamestderrwriter   r   _get_input_messageget_input_datar4   modelr2   cleanr3   stripsplitmany_to_onegetpassr   ValidationErrorjoinmessagesinputlowerosenvironr?   upperblank
isinstancestr_default_manager
db_managercreate_superuserstdoutKeyboardInterruptr@   exit)r"   r#   rB   usernamerE   	user_dataverbose_field_namefake_user_datadefault_username	error_msgmessager8   r9   input_valuepkr   	password2errresponseenv_varvaluees   &*,                   r   handleCommand.handle\   s   >>889:&	!00==	-NN  **>:
 )-In%V	}%% "$4::x009J9J9L9L22#7#J  $ 7 7 h!I !)))4#'^&-9K0LL  &"55++-=G  $22++W H  x$($;$;$(%	 %9 KK--i8'+H$;C$..778 **777 ''44::8D! ~~<<= #'.."@"@J NN00:::FE,3,?I) ,805I<QSW0X	-#/7"&"9"9%"@&*&9&9%&I0;*- ---++#.#4#4#6#68<	 5 $ 1 12V W (5@5F5Fs5K55Kr
5K5I1 !---5>5J2(((5:5G5G5M5M%162- #A6 %	1i6O6W&0H '0D EI9,))*OP ~~'2-))*RS %))T^^5Un5UV 19n-
 #i/3rzzA02

;V0WIn- #!zz~~+dnn.K.K.Q.Q.SS H #&;..778 
 !% 7 7 h!I !*955;C$..778"&.."@"@J1J4D4D4FFG#/JJ2::>>'3JE NN00:::FE  ;;;#/259PTV9V$*?*L  -2KKt,DI))))j9NPS.T.T1:1F1L1LS1Q11Q2HHJ1Q1	- #A$ NN++66x@QQ  {#q(!!"CD )_ ++ 		z54 &55 %))$))CLL*AB#(X$ $>>+s2$ 3%b1 ! 	KK67HHQK)) 	6tyy455' 	KK*	s   )\  2_ =_  B5_ :_ D<_ _ !_ 74_ +\<_ _ ;C_ ?] D<_ A_ %_ 7A(_ $_ _ ^?4A(_  \98\9<_ ^<A^7*_ 7^<<_ <a(a(a($`;;a(a('a(c                $   \        V4      pV'       d
   VR8X  d   Tp VP                  VR4      pV#   \        P                   dI   pT P                  P                  RRP                  TP                  4      ,          4       Rp Rp?T# Rp?ii ; i)zU
Override this method if you want to customize data inputs or
validation exceptions.
rG   Nz	Error: %srO   )rb   rZ   r   r_   rU   rV   r`   ra   )r"   r9   rv   r-   	raw_valuevalr~   s   &&&&   r   rX   Command.get_input_data   s}    
 'N	yBI	++i.C
 
	 )) 	KKkDIIajj,AABC
		s   2 B=B

Bc                X   \        VP                  4      : V'       d
   R V,          MR: VP                  '       dj   RVP                  P                  P                  P
                  : RVP                  '       d   VP                  4       MVP                  P                  : R2MR: R2# )z (leave blank to use '%s')rG   z (.)z: )	r   rP   r4   rY   r   object_namer3   m2m_target_field_namer8   )r"   r9   r-   s   &&&r   rW   Command._get_input_message  s    U''(6=(722E %%% &&,,22>> !--- 335"//::;	 
	
 	
r   c                ,  a  S P                   P                  '       d   R # \        ;QJ d=    V 3R lS P                  P                  P
                   4       F  '       g   K   R # 	  R# ! V 3R lS P                  P                  P
                   4       4      # )Tc              3      <"   T FO  p\        VP                  4      ^8H  ;'       d+    VP                  ^ ,          SP                  P                  8H  x  KQ  	  R# 5i)   N)lenfieldsr!   name).0unique_constraintr"   s   & r   	<genexpr>-Command.username_is_unique.<locals>.<genexpr>'  s^      
 &S! !(()Q. H H!((+t/B/B/G/GGH%Rs
   #A3AF)r!   uniqueanyr   r   total_unique_constraints)r"   s   fr   username_is_uniqueCommand.username_is_unique#  sw    %%%s 
 &*^^%9%9%R%R
ss 	
s 	
s 
 &*^^%9%9%R%R
 
 	
r   c                   V P                   '       d?    V P                  P                  P                  V4      P	                  V4       RV,          # V'       g   R\        V4      ,          #  V P                  P                  VR4       R#   T P                  P
                   d     LVi ; i  \        P                   d&   pRP                  TP                  4      u Rp?# Rp?ii ; i)z=Validate username. If invalid, return a string error message.z Error: That %s is already taken.rH   NrO   )r   r   rj   rk   get_by_natural_keyDoesNotExistr   r!   rZ   r   r_   r`   ra   )r"   rp   rr   rE   r~   s   &&&& r   rT   Command._validate_username-  s    """O//::8DWW :<NNN(84F+GGG	)%%h5 >>..  )) 	)99QZZ((	)s/   4B
 ,B+ 
B('B(+C% C C% C%)r   r>   r!   r=   r   )r   r   r   r   r(   requires_migrations_checksstealth_optionsr   r:   rA   r   rX   rW   r
   r   rT   r   __classdictcell____classcell__)r%   __classdict__s   @@r   r   r      sT     (D!% O
0d1bH 
& 
 
) )r   r   )__doc__r^   rd   r@   django.contrib.authr   django.contrib.auth.managementr   'django.contrib.auth.password_validationr   django.corer   django.core.management.baser   r   	django.dbr   r	   django.utils.functionalr
   django.utils.textr   	Exceptionr   rQ   r   r   r   r   <module>r      sN     	 
 . ? E " A 3 3 &	y 	 c)k c)r   