API¶
app_defaults module¶
-
app_defaults.settingsapp_defaults.Settings object¶ Get a setting from django settings or app defaults. In that order
Parameters: - apps (list) – List of apps to search for a
defaultsmodule. It’s usually a subset of theINSTALLED_APPSsetting. The order matters - modules (list) – List of module objects to lookup for settings
- locals_only (bool) – This is
Falseby default, mainly because it only works when the app’s path is relative to the running script. It’s considered better to pass the list of localappsinstead or make use ofcheck_magic_var. This may be deprecated in the future - check_magic_var (bool) – This checks the magic var
DEFAULT_SETTINGS_MODULE = Trueis present in each appdefaultsmodule. If the var isFalseor does not exists, then the module is ignored.
- apps (list) – List of apps to search for a
Settings Object¶
-
class
app_defaults.Settings(apps=None, modules=None, locals_only=False, check_magic_var=False)¶ Get a setting from django settings or app defaults. In that order
Parameters: - apps (list) – List of apps to search for a
defaultsmodule. It’s usually a subset of theINSTALLED_APPSsetting. The order matters - modules (list) – List of module objects to lookup for settings
- locals_only (bool) – This is
Falseby default, mainly because it only works when the app’s path is relative to the running script. It’s considered better to pass the list of localappsinstead or make use ofcheck_magic_var. This may be deprecated in the future - check_magic_var (bool) – This checks the magic var
DEFAULT_SETTINGS_MODULE = Trueis present in each appdefaultsmodule. If the var isFalseor does not exists, then the module is ignored.
- apps (list) – List of apps to search for a