Ë
    ÷i¯eÐ4  ã                   óö   — d Z ddlZddlZddlZddlZddlZddlmZ ddlZddl	m
Z
 ddlmZ ddlmZmZ ddlmZmZ dZd	Zd
ZdZdZdZ G d„ de«      Z G d„ de«      Z G d„ d«      Z G d„ d«      Z e«       Zy)zï
Settings and configuration for Django.

Read values from the module specified by the DJANGO_SETTINGS_MODULE environment
variable, and then from django.conf.global_settings; see the global_settings.py
for a list of all possible variables.
é    N)ÚPath)Úglobal_settings)ÚImproperlyConfigured)ÚRemovedInDjango51WarningÚRemovedInDjango60Warning)Ú
LazyObjectÚemptyÚDJANGO_SETTINGS_MODULEÚdefaultÚstaticfileszEThe DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead.zDThe STATICFILES_STORAGE setting is deprecated. Use STORAGES instead.zCThe FORMS_URLFIELD_ASSUME_HTTPS transitional setting is deprecated.c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚSettingsReferencez£
    String subclass which references a current settings value. It's treated as
    the value in memory but serializes to a settings.NAME attribute reference.
    c                 ó.   — t         j                  | |«      S ©N)ÚstrÚ__new__©ÚselfÚvalueÚsetting_names      ú=E:\TRUCKING_PROJECT\Lib\site-packages\django/conf/__init__.pyr   zSettingsReference.__new__.   s   € Ü�{‰{˜4 Ó'Ð'ó    c                 ó   — || _         y r   )r   r   s      r   Ú__init__zSettingsReference.__init__1   s
   € Ø(ˆÕr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r   (   s   „ ñò
(ó)r   r   c                   ó�   ‡ — e Zd ZdZdd„Zd„ Zd„ Zˆ fd„Zˆ fd„Ze	fd„Z
ed„ «       Zed	„ «       Zd
„ Zed„ «       Zed„ «       Zˆ xZS )ÚLazySettingszì
    A lazy proxy for either global Django settings or a custom settings object.
    The user can manually configure settings prior to using them. Otherwise,
    Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
    c                 ó¬   — t         j                  j                  t        «      }|s|rd|z  nd}t	        d|›dt        ›d�«      ‚t        |«      | _        y)zÄ
        Load the settings module pointed to by the environment variable. This
        is used the first time settings are needed, if the user hasn't
        configured settings manually.
        z
setting %sÚsettingsz
Requested zS, but settings are not configured. You must either define the environment variable z8 or call settings.configure() before accessing settings.N)ÚosÚenvironÚgetÚENVIRONMENT_VARIABLEr   ÚSettingsÚ_wrapped)r   ÚnameÚsettings_moduleÚdescs       r   Ú_setupzLazySettings._setup<   sP   € ô Ÿ*™*Ÿ.™.Ô)=Ó>ˆÙÙ,0�L 4Ò'°jˆDÝ&ò Ö-ð/óð ô ! Ó1ˆ�r   c                 ó^   — | j                   t        u rydd| j                   j                  iz  S )Nz<LazySettings [Unevaluated]>z$<LazySettings "%(settings_module)s">r+   )r)   r	   ÚSETTINGS_MODULE©r   s    r   Ú__repr__zLazySettings.__repr__N   s2   € à�=‰=œEÑ!Ø1Ø5Ø˜tŸ}™}×<Ñ<ð9
ñ 
ð 	
r   c                 óò   — | j                   x}t        u r| j                  |«       | j                   }t        ||«      }|dv r|�| j	                  |«      }n|dk(  r|st        d«      ‚|| j                  |<   |S )z<Return the value of a setting and cache it in self.__dict__.>   Ú	MEDIA_URLÚ
STATIC_URLÚ
SECRET_KEYz)The SECRET_KEY setting must not be empty.)r)   r	   r-   ÚgetattrÚ_add_script_prefixr   Ú__dict__)r   r*   r)   Úvals       r   Ú__getattr__zLazySettings.__getattr__V   s|   € àŸ™Ð%ˆH¬%Ñ/Ø�K‰K˜ÔØ—}‘}ˆHÜ�h Ó%ˆð Ð.Ñ.°3°?Ø×)Ñ)¨#Ó.‰CØ�\Ò!©#Ü&Ð'RÓSÐSà!ˆ�‰�dÑØˆ
r   c                 óž   •— |dk(  r| j                   j                  «        n| j                   j                  |d«       t        ‰| �  ||«       y)zŸ
        Set the value of setting. Clear all cached values if _wrapped changes
        (@override_settings does this) or clear single values when set.
        r)   N)r8   ÚclearÚpopÚsuperÚ__setattr__)r   r*   r   Ú	__class__s      €r   r?   zLazySettings.__setattr__g   s@   ø€ ð
 �:ÒØ�M‰M×ÑÕ!à�M‰M×Ñ˜d DÔ)Ü‰Ñ˜D %Õ(r   c                 ó\   •— t         ‰| �  |«       | j                  j                  |d«       y)z3Delete a setting and clear it from cache if needed.N)r>   Ú__delattr__r8   r=   ©r   r*   r@   s     €r   rB   zLazySettings.__delattr__r   s$   ø€ ä‰Ñ˜DÔ!Ø�‰×Ñ˜$ Õ%r   c                 óè   — | j                   t        urt        d«      ‚t        |«      }|j	                  «       D ]0  \  }}|j                  «       st        d|z  «      ‚t        |||«       Œ2 || _         y)zÜ
        Called to manually configure the settings. The 'default_settings'
        parameter sets where to retrieve any unspecified values from (its
        argument must support attribute access (__getattr__)).
        zSettings already configured.zSetting %r must be uppercase.N)r)   r	   ÚRuntimeErrorÚUserSettingsHolderÚitemsÚisupperÚ	TypeErrorÚsetattr)r   Údefault_settingsÚoptionsÚholderr*   r   s         r   Ú	configurezLazySettings.configurew   so   € ð �=‰=¤Ñ%ÜÐ=Ó>Ð>Ü#Ð$4Ó5ˆØ"Ÿ=™=›?ò 	)‰KˆD�%Ø—<‘<”>ÜÐ ?À$Ñ FÓGÐGÜ�F˜D %Õ(ð	)ð ˆ�r   c                 óJ   — | j                  d«      r| S ddlm}  |«       ›| ›�S )zÕ
        Add SCRIPT_NAME prefix to relative paths.

        Useful when the app is being served at a subpath and manually prefixing
        subpath to STATIC_URL and MEDIA_URL in settings is inconvenient.
        )zhttp://zhttps://ú/r   )Úget_script_prefix)Ú
startswithÚdjango.urlsrQ   )r   rQ   s     r   r7   zLazySettings._add_script_prefix†   s)   € ð ×ÑÐ8Ô9ØˆLÝ1á*Ô,©eÐ4Ð4r   c                 ó&   — | j                   t        uS )z9Return True if the settings have already been configured.)r)   r	   r0   s    r   Ú
configuredzLazySettings.configured•   s   € ð �}‰}¤EÐ)Ð)r   c                 óê   — t        j                  «       }|d   \  }}}}|j                  t        j                  j                  t        j                  «      «      st        j                  ||d¬«       y y )Néüÿÿÿé   )Ú
stacklevel)
Ú	tracebackÚextract_stackrR   r$   ÚpathÚdirnameÚdjangoÚ__file__ÚwarningsÚwarn)r   ÚmessageÚcategoryÚstackÚfilenameÚ_s         r   Ú_show_deprecation_warningz&LazySettings._show_deprecation_warningš   sY   € Ü×'Ñ'Ó)ˆð " "™IÑˆ�!�Q˜Ø×"Ñ"¤2§7¡7§?¡?´6·?±?Ó#CÔDÜ�M‰M˜' 8¸Ö:ð Er   c                 óX   — | j                  t        t        «       | j                  d«      S )NÚDEFAULT_FILE_STORAGE)rg   Ú#DEFAULT_FILE_STORAGE_DEPRECATED_MSGr   r:   r0   s    r   ri   z!LazySettings.DEFAULT_FILE_STORAGE¤   s*   € à×&Ñ&Ü/Ô1Iô	
ð ×ÑÐ 6Ó7Ð7r   c                 óX   — | j                  t        t        «       | j                  d«      S )NÚSTATICFILES_STORAGE)rg   Ú"STATICFILES_STORAGE_DEPRECATED_MSGr   r:   r0   s    r   rl   z LazySettings.STATICFILES_STORAGE¬   s*   € à×&Ñ&Ü.Ô0Hô	
ð ×ÑÐ 5Ó6Ð6r   r   )r   r   r   r   r-   r1   r:   r?   rB   r   rN   Ústaticmethodr7   ÚpropertyrU   rg   ri   rl   Ú__classcell__©r@   s   @r   r!   r!   5   s€   ø„ ñó2ò$
òô"	)ô&ð
 *9ó ð ñ5ó ð5ð ñ*ó ð*ò;ð ñ8ó ð8ð ñ7ó ô7r   r!   c                   ó   — e Zd Zd„ Zd„ Zd„ Zy)r(   c           	      óŽ  — t        t        «      D ].  }|j                  «       sŒt        | |t	        t        |«      «       Œ0 || _        t        j                  | j
                  «      }d}t        «       | _	        t        |«      D ]o  }|j                  «       sŒt	        ||«      }||v r$t        |t        t        f«      st        d|z  «      ‚t        | ||«       | j                  j                  |«       Œq | j                  d«      rt!        j"                  t$        t&        «       t)        t*        d«      r¨| j,                  rœt/        d«      } |j0                  | j,                  j3                  d«      Ž }|j5                  «       r(|j5                  «       st7        d| j,                  z  «      ‚| j,                  t8        j:                  d<   t+        j<                  «        | j                  d	«      ra| j                  d
«      rt        d«      ‚i | j>                  ¥t@        d| jB                  ii¥| _        t!        j"                  tD        tF        «       | j                  d«      ra| j                  d
«      rt        d«      ‚i | j>                  ¥tH        d| jJ                  ii¥| _        t!        j"                  tL        tF        «       | j                  d
«      rut        | d	| j>                  jO                  t@        i «      jO                  d«      «       t        | d| j>                  jO                  tH        i «      jO                  d«      «       y y )N)ÚALLOWED_HOSTSÚINSTALLED_APPSÚTEMPLATE_DIRSÚLOCALE_PATHSÚSECRET_KEY_FALLBACKSz)The %s setting must be a list or a tuple.ÚFORMS_URLFIELD_ASSUME_HTTPSÚtzsetz/usr/share/zoneinforP   zIncorrect timezone setting: %sÚTZri   ÚSTORAGESz5DEFAULT_FILE_STORAGE/STORAGES are mutually exclusive.ÚBACKENDrl   z4STATICFILES_STORAGE/STORAGES are mutually exclusive.)(Údirr   rH   rJ   r6   r/   Ú	importlibÚimport_moduleÚsetÚ_explicit_settingsÚ
isinstanceÚlistÚtupler   ÚaddÚis_overriddenr`   ra   Ú*FORMS_URLFIELD_ASSUME_HTTPS_DEPRECATED_MSGr   ÚhasattrÚtimeÚ	TIME_ZONEr   ÚjoinpathÚsplitÚexistsÚ
ValueErrorr$   r%   rz   r|   ÚDEFAULT_STORAGE_ALIASri   rj   r   ÚSTATICFILES_STORAGE_ALIASrl   rm   r&   )r   r+   ÚsettingÚmodÚtuple_settingsÚsetting_valueÚzoneinfo_rootÚzone_info_files           r   r   zSettings.__init__µ   sÑ  € äœ?Ó+ò 	JˆGØ�‰Õ Ü˜˜g¤w¬ÀÓ'HÕIð	Jð
  /ˆÔä×%Ñ% d×&:Ñ&:Ó;ˆð
ˆô #&£%ˆÔÜ˜3“xò 	5ˆGØ�‰Õ Ü '¨¨WÓ 5�à˜nÑ,´ZØ!¤D¬% =ô6ô /ØCÀgÑMóð ô ˜˜g }Ô5Ø×'Ñ'×+Ñ+¨GÕ4ð	5ð ×ÑÐ;Ô<Ü�M‰MÜ:Ü(ôô
 ”4˜Ô! d§n¢nô !Ð!6Ó7ˆMØ3˜]×3Ñ3°T·^±^×5IÑ5IÈ#Ó5NÐOˆNØ×#Ñ#Ô%¨n×.CÑ.CÔ.EÜ Ð!AÀDÇNÁNÑ!RÓSÐSð  $Ÿ~™~ŒB�J‰J�tÑÜ�J‰JŒLà×ÑÐ4Ô5Ø×!Ñ! *Ô-Ü*ØKóð ðØ—-‘-ðä%¨	°4×3LÑ3LÐ'MñˆDŒMô �M‰MÔ=Ô?WÔXà×ÑÐ3Ô4Ø×!Ñ! *Ô-Ü*ØJóð ðØ—-‘-ðä)¨I°t×7OÑ7OÐ+PñˆDŒMô �M‰MÔ<Ô>VÔWà×Ñ˜jÔ)ÜØØ&Ø—‘×!Ñ!Ô"7¸Ó<×@Ñ@ÀÓKôô
 ØØ%Ø—‘×!Ñ!Ô";¸RÓ@×DÑDÀYÓOõð *r   c                 ó   — || j                   v S r   )r‚   )r   r’   s     r   r‡   zSettings.is_overridden	  s   € Ø˜$×1Ñ1Ð1Ð1r   c                 óN   — d| j                   j                  | j                  dœz  S )Nz<%(cls)s "%(settings_module)s">)Úclsr+   )r@   r   r/   r0   s    r   r1   zSettings.__repr__  s*   € Ø0Ø—>‘>×*Ñ*Ø#×3Ñ3ñ4
ñ 
ð 	
r   N)r   r   r   r   r‡   r1   r   r   r   r(   r(   ´   s   „ òRòh2ó
r   r(   c                   óN   ‡ — e Zd ZdZdZd„ Zd„ Zˆ fd„Zˆ fd„Zd„ Z	d„ Z
d	„ Zˆ xZS )
rF   z$Holder for user configured settings.Nc                 ó@   — t        «       | j                  d<   || _        y)z›
        Requests for configuration variables not in this class are satisfied
        from the module specified in default_settings (if possible).
        Ú_deletedN)r�   r8   rK   )r   rK   s     r   r   zUserSettingsHolder.__init__  s   € ô
 %(£Eˆ�‰�jÑ!Ø 0ˆÕr   c                 óv   — |j                  «       r|| j                  v rt        ‚t        | j                  |«      S r   )rH   r�   ÚAttributeErrorr6   rK   )r   r*   s     r   r:   zUserSettingsHolder.__getattr__"  s/   € Ø�|‰|Œ~ ¨¯©Ñ!6Ü Ð Ü�t×,Ñ,¨dÓ3Ð3r   c                 óB  •— | j                   j                  |«       |dk(  r=d| j                  i| j                  t        <   t        j                  t        t        «       |dk(  r=d| j                  i| j                  t        <   t        j                  t        t        «       |dk(  rt        j                  t        t        «       t        ‰| �=  ||«       |dk(  rÇ| j                  j!                  t        «      x}r t        ‰| �=  d|j!                  d«      «       n"| j                  j#                  t        ddi«       | j                  j!                  t        «      x}r t        ‰| �=  d|j!                  d«      «       y | j                  j#                  t        ddi«       y y )Nri   r}   rl   ry   r|   z+django.core.files.storage.FileSystemStoragez5django.contrib.staticfiles.storage.StaticFilesStorage)r�   Údiscardri   r|   r�   r`   ra   rj   r   rl   r‘   rm   rˆ   r   r>   r?   r&   Ú
setdefault)r   r*   r   Údefault_file_storageÚstaticfiles_storager@   s        €r   r?   zUserSettingsHolder.__setattr__'  st  ø€ Ø�‰×Ñ˜dÔ#ØÐ)Ò)à˜4×4Ñ4ð4ˆD�M‰MÔ/Ñ0ô �M‰MÔ=Ô?WÔXØÐ(Ò(à˜4×3Ñ3ð8ˆD�M‰MÔ3Ñ4ô �M‰MÔ<Ô>VÔWØÐ0Ò0Ü�M‰MÜ:Ü(ôô 	‰Ñ˜D %Ô(à�:ÒØ'+§}¡}×'8Ñ'8Ô9NÓ'OÐOÐ#ÐOÜ‘Ñ#Ø*Ð,@×,DÑ,DÀYÓ,Oõð —‘×(Ñ(Ü)ØÐ MÐNôð '+§m¡m×&7Ñ&7Ô8QÓ&RÐRÐ"ÐRÜ‘Ñ#Ø)Ð+>×+BÑ+BÀ9Ó+Mõð —‘×(Ñ(Ü-à!ØSðõð r   c                 ót   •— | j                   j                  |«       t        | |«      rt        ‰| �  |«       y y r   )r�   r†   r‰   r>   rB   rC   s     €r   rB   zUserSettingsHolder.__delattr__R  s1   ø€ Ø�‰×Ñ˜$ÔÜ�4˜ÔÜ‰GÑ Õ%ð r   c                 ón   ‡ — t        ˆ fd„g ‰ j                  ¢t        ‰ j                  «      ¢D «       «      S )Nc              3   ó>   •K  — | ]  }|‰j                   vr|–— Œ y ­wr   )r�   )Ú.0Úsr   s     €r   ú	<genexpr>z-UserSettingsHolder.__dir__.<locals>.<genexpr>X  s%   øè ø€ ò 
àØ˜Ÿ™Ñ%ô ñ
ùs   ƒ)Úsortedr8   r~   rK   r0   s   `r   Ú__dir__zUserSettingsHolder.__dir__W  s6   ø€ Üó 
àB�t—}‘}ÐB¤s¨4×+@Ñ+@Ó'AÐBô
ó 
ð 	
r   c                 óŠ   — || j                   v }|| j                  v } t        | j                  dd„ «      |«      }|xs |xs |S )Nr‡   c                  ó   — y)NFr   )r©   s    r   ú<lambda>z2UserSettingsHolder.is_overridden.<locals>.<lambda>b  s   � r   )r�   r8   r6   rK   )r   r’   ÚdeletedÚset_locallyÚset_on_defaults        r   r‡   z UserSettingsHolder.is_overridden^  sS   € Ø˜TŸ]™]Ð*ˆØ §¡Ð.ˆð
œØ×!Ñ! ?±Oó
à
óˆð Ò7˜+Ò7¨Ð7r   c                 ó8   — dd| j                   j                  iz  S )Nz	<%(cls)s>rš   )r@   r   r0   s    r   r1   zUserSettingsHolder.__repr__f  s#   € ØØ�4—>‘>×*Ñ*ð
ñ 
ð 	
r   )r   r   r   r   r/   r   r:   r?   rB   r¬   r‡   r1   rp   rq   s   @r   rF   rF     s1   ø„ Ù.ð €Oò1ò4ô
)ôV&ò

ò8ö
r   rF   )r   r   r$   rŠ   rZ   r`   Úpathlibr   r^   Údjango.confr   Údjango.core.exceptionsr   Údjango.utils.deprecationr   r   Údjango.utils.functionalr   r	   r'   r�   r‘   rj   rm   rˆ   r   r   r!   r(   rF   r#   r   r   r   ú<module>r¹      sž   ðñó Û 	Û Û Û Ý ã Ý 'Ý 7ß Wß 5à/Ð Ø!Ð Ø)Ð ð Lð $ð
 Kð #ð Jð +ô

)˜ô 
)ô|7�:ô |7÷~\
ñ \
÷~V
ñ V
ñr ‹>�r   