|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/conf/ |
Upload File : |
�
r�\c @ s 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 m Z d d l
m Z m Z d d l
m Z d d l m Z d d l
m Z d Z d
e f d � � YZ d e f d
� � YZ d e f d � � YZ d e f d � � YZ e � Z d S( s�
Settings and configuration for Django.
Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment
variable, and then from django.conf.global_settings; see the global settings file for
a list of all possible variables.
i����N( t global_settings( t ImproperlyConfigured( t
LazyObjectt empty( t importlib( t import_by_path( t sixt DJANGO_SETTINGS_MODULEt LazySettingsc B sG e Z d Z d d � Z d � Z d � Z e d � Z e d � � Z
RS( s�
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 C s} y t j t } | s t � n Wn= t k
r_ | r@ d | n d } t d | t f � � n Xt | � | _ | j � d S( s�
Load the settings module pointed to by the environment variable. This
is used the first time we need any settings at all, if the user has not
previously configured the settings manually.
s
setting %st settingss� Requested %s, but settings are not configured. You must either define the environment variable %s or call settings.configure() before accessing settings.N( t ost environt ENVIRONMENT_VARIABLEt KeyErrorR t Settingst _wrappedt _configure_logging( t selft namet settings_modulet desc( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyt _setup s
c C s/ | j t k r | j | � n t | j | � S( N( R R R t getattr( R R ( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyt __getattr__4 s c C s� t j sA y! t j t � t j d t � WqA t k
r= qA Xn | j r� d d l
m } t | j � } | | � | j
r� | | j
� q� n d S( sI
Setup logging from LOGGING_CONFIG and LOGGING settings.
t defaulti����( t DEFAULT_LOGGINGN( t syst warnoptionst loggingt captureWarningst Truet warningst simplefiltert DeprecationWarningt AttributeErrort LOGGING_CONFIGt django.utils.logR R t LOGGING( R R t logging_config_func( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyR 9 s
c K sn | j t k r t d � � n t | � } x* | j � D] \ } } t | | | � q7 W| | _ | j � d S( s�
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__)).
s Settings already configured.N( R R t RuntimeErrort UserSettingsHoldert itemst setattrR ( R t default_settingst optionst holderR t value( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyt configureR s c C s
| j t k S( sL
Returns True if the settings have already been configured.
( R R ( R ( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyt
configured` s N( t __name__t
__module__t __doc__t NoneR R R R R/ t propertyR0 ( ( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyR s t BaseSettingsc B s e Z d Z d � Z RS( sK
Common logic for settings whether set by a module or by the user.
c C sy | d k r5 | r5 | j d � r5 t d | � � n- | d k rb t | t j � rb t d � � n t j | | | � d S( Nt MEDIA_URLt
STATIC_URLt /s If set, %s must end with a slasht ALLOWED_INCLUDE_ROOTSsG The ALLOWED_INCLUDE_ROOTS setting must be set to a tuple, not a string.( R7 R8 ( t endswithR t
isinstanceR t string_typest
ValueErrort objectt __setattr__( R R R. ( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyR@ l s
"( R1 R2 R3 R@ ( ( ( s6 /tmp/pip-install-XxeQeY/django/django/conf/__init__.pyR6 h s R c B s e Z d � Z RS( c C s� xB t t � D]4 } | | j � k r
t | | t t | � � q
q
W| | _ y t j | j � } Wn, t k
r� } t d | j | f � � n Xd
} x� t | � D]~ } | | j � k r� t | | � } | | k rt | t
j � rt j
d | t d d �| f } n t | | | � q� q� W| j s@t d � � n t t d � r�| j r�d } t j j | � r�t j j t j j | | j j d
� � � r�t d | j � � n | j t j d <t j � n d S( Nsf Could not import settings '%s' (Is it on sys.path? Is there an import error in the settings file?): %st INSTALLED_APPSt
TEMPLATE_DIRSs_ The %s setting must be a tuple. Please fix your settings, as auto-correction is now deprecated.t
stackleveli s) The SECRET_KEY setting must not be empty.t tzsets /usr/share/zoneinfoR9 s Incorrect timezone setting: %st TZ( RA RB ( t dirR t upperR* R t SETTINGS_MODULER t
import_modulet ImportErrorR<