class LazySettings(LazyObject): (source)
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 |
Undocumented |
Static Method | _add |
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 |
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 |
Set the value of setting. Clear all cached values if _wrapped changes (@override_settings does this) or clear single values when set.
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__)).
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.