HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/django/conf/__pycache__/__init__.cpython-310.pyc
o

3�a
)�@s�dZddlZddlZddlZddlZddlZddlmZddlZddl	m
Z
ddlmZddl
mZddlmZmZdZd	Zd
ZGdd�de�ZGd
d�de�ZGdd�d�ZGdd�d�Ze�ZdS)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)�RemovedInDjango40Warning)�
LazyObject�empty�DJANGO_SETTINGS_MODULEzZThe PASSWORD_RESET_TIMEOUT_DAYS setting is deprecated. Use PASSWORD_RESET_TIMEOUT instead.z�The DEFAULT_HASHING_ALGORITHM transitional setting is deprecated. Support for it and tokens, cookies, sessions, and signatures that use SHA-1 hashing algorithm will be removed in Django 4.0.c@s eZdZdZdd�Zdd�ZdS)�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.
    cCst�||�S�N)�str�__new__��self�value�setting_name�r�6/usr/lib/python3/dist-packages/django/conf/__init__.pyr)szSettingsReference.__new__cCs
||_dSr
)rr
rrr�__init__,�
zSettingsReference.__init__N)�__name__�
__module__�__qualname__�__doc__rrrrrrr	$sr	csveZdZdZddd�Zdd�Zdd�Z�fd	d
�Z�fdd�Ze	fd
d�Z
edd��Ze
dd��Ze
dd��Z�ZS)�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.
    NcCs>tj�t�}|s|rd|nd}td|tf��t|�|_dS)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 %s, but settings are not configured. You must either define the environment variable %s or call settings.configure() before accessing settings.N)�os�environ�get�ENVIRONMENT_VARIABLEr�Settings�_wrapped)r�name�settings_module�descrrr�_setup6s��zLazySettings._setupcCs|jturdSdd|jjiS)Nz<LazySettings [Unevaluated]>z$<LazySettings "%(settings_module)s">r")r r�SETTINGS_MODULE�rrrr�__repr__Gs

�zLazySettings.__repr__cCs^|jtur
|�|�t|j|�}|dvr|dur|�|�}n
|dkr(|s(td��||j|<|S)z<Return the value of a setting and cache it in self.__dict__.>�	MEDIA_URL�
STATIC_URLN�
SECRET_KEYz)The SECRET_KEY setting must not be empty.)r rr$�getattr�_add_script_prefixr�__dict__)rr!�valrrr�__getattr__Os


zLazySettings.__getattr__cs4|dkr
|j��n|j�|d�t��||�dS)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)r-�clear�pop�super�__setattr__�rr!r��	__class__rrr3_szLazySettings.__setattr__cst��|�|j�|d�dS)z3Delete a setting and clear it from cache if needed.N)r2�__delattr__r-r1�rr!r5rrr7jszLazySettings.__delattr__cKsV|jtur	td��t|�}|��D]\}}|��std|��t|||�q||_dS)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__)).
        zSettings already configured.zSetting %r must be uppercase.N)r r�RuntimeError�UserSettingsHolder�items�isupper�	TypeError�setattr)r�default_settings�options�holderr!rrrr�	configureos

zLazySettings.configurecCs(|�d�r|Sddlm}d|�|fS)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.
        )zhttp://zhttps://�/r)�get_script_prefixz%s%s)�
startswith�django.urlsrD)rrDrrrr,~s
	zLazySettings._add_script_prefixcCs
|jtuS)z9Return True if the settings have already been configured.)r rr&rrr�
configured�s
zLazySettings.configuredcCsFt��}|d\}}}}|�tj�tj��stj	t
tdd�|�d�S)N����)�
stacklevel�PASSWORD_RESET_TIMEOUT_DAYS)
�	traceback�
extract_stackrEr�path�dirname�django�__file__�warnings�warn�*PASSWORD_RESET_TIMEOUT_DAYS_DEPRECATED_MSGrr/)r�stack�filename�_rrrrK�s�
z(LazySettings.PASSWORD_RESET_TIMEOUT_DAYSr
)rrrrr$r'r/r3r7rrB�staticmethodr,�propertyrGrK�
__classcell__rrr5rr0s


rc@s$eZdZdd�Zdd�Zdd�ZdS)rcCs`tt�D]}|��rt||tt|��q||_t�|j�}d}t�|_	t|�D](}|��rOt||�}||vrCt
|ttf�sCt
d|��t|||�|j	�|�q'|�d�rq|�d�r^t
d��t|d|jddd�t�tt�|�d�r|t�tt�ttd	�r�|jr�td
�}|j|j�d��}|��r�|��s�td|j��|jtjd
<t� �dSdSdS)N)�INSTALLED_APPS�
TEMPLATE_DIRS�LOCALE_PATHSz*The %s setting must be a list or a tuple. rK�PASSWORD_RESET_TIMEOUTzJPASSWORD_RESET_TIMEOUT_DAYS/PASSWORD_RESET_TIMEOUT are mutually exclusive.�<��DEFAULT_HASHING_ALGORITHM�tzsetz/usr/share/zoneinforCzIncorrect timezone setting: %s�TZ)!�dirrr<r>r+r%�	importlib�
import_module�set�_explicit_settings�
isinstance�list�tupler�add�
is_overriddenrKrRrSrTr�(DEFAULT_HASHING_ALGORITHM_DEPRECATED_MSG�hasattr�time�	TIME_ZONEr�joinpath�split�exists�
ValueErrorrrrb)rr"�setting�mod�tuple_settings�
setting_value�
zoneinfo_root�zone_info_filerrrr�sF�
��

�
�zSettings.__init__cCs
||jvSr
)rh)rrvrrrrm�rzSettings.is_overriddencCsd|jj|jd�S)Nz<%(cls)s "%(settings_module)s">)�clsr")r6rr%r&rrrr'�s�zSettings.__repr__N)rrrrrmr'rrrrr�s3rcsXeZdZdZdZdd�Zdd�Z�fdd�Z�fd	d
�Zdd�Z	d
d�Z
dd�Z�ZS)r:z$Holder for user configured settings.NcCst�|jd<||_dS)z�
        Requests for configuration variables not in this class are satisfied
        from the module specified in default_settings (if possible).
        �_deletedN)rgr-r?)rr?rrrr�s
zUserSettingsHolder.__init__cCs"|��r	||jvrt�t|j|�Sr
)r<r}�AttributeErrorr+r?r8rrrr/�szUserSettingsHolder.__getattr__cs^|j�|�|dkrt|d|ddd�t�tt�|dkr&t�tt�t��	||�dS)NrKr^r_r`ra)
r}�discardr>rRrSrTrrnr2r3r4r5rrr3�szUserSettingsHolder.__setattr__cs*|j�|�t||�rt��|�dSdSr
)r}rlror2r7r8r5rrr7�s
�zUserSettingsHolder.__delattr__cs&t�fdd�g�j�t�j��D��S)Nc3s�|]
}|�jvr|VqdSr
)r})�.0�sr&rr�	<genexpr>s�
��z-UserSettingsHolder.__dir__.<locals>.<genexpr>)�sortedr-rdr?r&rr&r�__dir__�s�zUserSettingsHolder.__dir__cCs6||jv}||jv}t|jddd��|�}|p|p|S)NrmcSsdS)NFr)r�rrr�<lambda>sz2UserSettingsHolder.is_overridden.<locals>.<lambda>)r}r-r+r?)rrv�deleted�set_locally�set_on_defaultrrrrms

z UserSettingsHolder.is_overriddencCsdd|jjiS)Nz	<%(cls)s>r|)r6rr&rrrr's�zUserSettingsHolder.__repr__)
rrrrr%rr/r3r7r�rmr'rZrrr5rr:�s	r:)rrerrprLrR�pathlibrrP�django.confr�django.core.exceptionsr�django.utils.deprecationr�django.utils.functionalrrrrTrnrr	rrr:rrrrr�<module>s,��p>
3