class documentation

class LazySettings(LazyObject): (source)

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.

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 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__)).
Property configured Return True if the settings have already been configured.
Property USE_L10N Undocumented
Static Method _add_script_prefix Add SCRIPT_NAME prefix to relative paths.
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.
Instance Variable _wrapped Undocumented
Property _USE_L10N_INTERNAL Undocumented

Inherited from LazyObject:

Method __copy__ Undocumented
Method __deepcopy__ Undocumented
Method __getattribute__ 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
def __delattr__(self, name): (source)

Delete a setting and clear it from cache if needed.

def __getattr__(self, name): (source)

Return the value of a setting and cache it in self.__dict__.

def __repr__(self): (source)

Undocumented

def __setattr__(self, name, value): (source)

Set the value of setting. Clear all cached values if _wrapped changes (@override_settings does this) or clear single values when set.

def configure(self, default_settings=global_settings, **options): (source)

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__)).

Return True if the settings have already been configured.

Undocumented

@staticmethod
def _add_script_prefix(value): (source)

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 _setup(self, name=None): (source)

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.

@property
_USE_L10N_INTERNAL = (source)

Undocumented