Did I find the right examples for you? yes no

All Samples(26)  |  Call(24)  |  Derive(0)  |  Import(2)
Get a setting from `dash` conf module, falling back to the default.

If override is not None, it will be used instead of the setting.

:param setting: String with setting name
:param override: Value to use when no setting is available. Defaults to None.
:return: Setting value.

        def get_setting(setting, override=None):
    """
    Get a setting from `dash` conf module, falling back to the default.

    If override is not None, it will be used instead of the setting.

    :param setting: String with setting name
    :param override: Value to use when no setting is available. Defaults to None.
    :return: Setting value.
    """
    if override is not None:
        return override
    if hasattr(settings, 'DASH_{0}'.format(setting)):
        return getattr(settings, 'DASH_{0}'.format(setting))
    else:
        return getattr(defaults, setting)
        


src/d/j/django-dash-0.4.4/src/dash/settings.py   django-dash(Download)
)
 
from dash.conf import get_setting
 
RESTRICT_PLUGIN_ACCESS = get_setting('RESTRICT_PLUGIN_ACCESS')
 
PLUGINS_MODULE_NAME = get_setting('PLUGINS_MODULE_NAME')
 
ACTIVE_LAYOUT = get_setting('ACTIVE_LAYOUT')
ACTIVE_LAYOUT = get_setting('ACTIVE_LAYOUT')
 
LAYOUTS_MODULE_NAME = get_setting('LAYOUTS_MODULE_NAME')
 
DEFAULT_WORKSPACE_NAME = get_setting('DEFAULT_WORKSPACE_NAME')

src/d/j/django-dash-HEAD/src/dash/settings.py   django-dash(Download)
)
 
from dash.conf import get_setting
 
RESTRICT_PLUGIN_ACCESS = get_setting('RESTRICT_PLUGIN_ACCESS')
 
PLUGINS_MODULE_NAME = get_setting('PLUGINS_MODULE_NAME')
 
ACTIVE_LAYOUT = get_setting('ACTIVE_LAYOUT')
ACTIVE_LAYOUT = get_setting('ACTIVE_LAYOUT')
 
LAYOUTS_MODULE_NAME = get_setting('LAYOUTS_MODULE_NAME')
 
DEFAULT_WORKSPACE_NAME = get_setting('DEFAULT_WORKSPACE_NAME')