class documentation

class LazySettings(LazyObject):

View In Hierarchy

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.
Static Method ​_add​_script​_prefix Add SCRIPT_NAME prefix to relative paths.
Method __delattr__ Delete a setting and clear it from cache if needed.
Method __getattr__ Return the value of a setting and cache it in self.__dict__.
Method __repr__ Undocumented
Method __setattr__ Set the value of setting. Clear all cached values if _wrapped changes (@override_settings does this) or clear single values when set.
Method ​_setup 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.
Method configure 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__)).
Instance Variable ​_wrapped Undocumented
Property ​_USE​_L10N​_INTERNAL Undocumented
Property configured Return True if the settings have already been configured.
Property USE​_L10N Undocumented

Inherited from LazyObject:

Method __copy__ Undocumented
Method __deepcopy__ Undocumented
Method __init__ Undocumented
Method __reduce__ Undocumented
Class Variable __bool__ Undocumented
Class Variable __bytes__ Undocumented
Class Variable __class__ Undocumented
Class Variable __contains__ Undocumented
Class Variable __delitem__ Undocumented
Class Variable __dir__ Undocumented
Class Variable __eq__ Undocumented
Class Variable __getitem__ Undocumented
Class Variable __gt__ Undocumented
Class Variable __hash__ Undocumented
Class Variable __iter__ Undocumented
Class Variable __len__ Undocumented
Class Variable __lt__ Undocumented
Class Variable __ne__ Undocumented
Class Variable __setitem__ Undocumented
Class Variable __str__ Undocumented
@staticmethod
def _add_script_prefix(value):

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.

def __delattr__(self, name):
Delete a setting and clear it from cache if needed.
def __getattr__(self, name):
Return the value of a setting and cache it in self.__dict__.
def __repr__(self):

Undocumented

def __setattr__(self, name, value):
Set the value of setting. Clear all cached values if _wrapped changes (@override_settings does this) or clear single values when set.
def _setup(self, name=None):
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.
def configure(self, default_settings=global_settings, **options):
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__)).
_wrapped =
@property
_USE_L10N_INTERNAL =

Undocumented

@property
configured =
Return True if the settings have already been configured.
@property
USE_L10N =

Undocumented