Did I find the right examples for you? yes no

All Samples(20)  |  Call(18)  |  Derive(0)  |  Import(2)
Get a setting from ``dash.contrib.plugins.image`` 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.contrib.plugins.image`` 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_PLUGIN_IMAGE_{0}'.format(setting)):
        return getattr(settings, 'DASH_PLUGIN_IMAGE_{0}'.format(setting))
    else:
        return getattr(defaults, setting)
        


src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/image/settings.py   django-dash(Download)
           'FIT_METHODS_CHOICES_WITH_EMPTY_OPTION', 'IMAGES_UPLOAD_DIR')
 
from dash.contrib.plugins.image.conf import get_setting
 
FIT_METHOD_CROP_SMART = get_setting('FIT_METHOD_CROP_SMART')
FIT_METHOD_CROP_CENTER = get_setting('FIT_METHOD_CROP_CENTER')
FIT_METHOD_CROP_SCALE = get_setting('FIT_METHOD_CROP_SCALE')
FIT_METHOD_FIT_WIDTH = get_setting('FIT_METHOD_FIT_WIDTH')

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/image/settings.py   django-dash(Download)
           'FIT_METHODS_CHOICES_WITH_EMPTY_OPTION', 'IMAGES_UPLOAD_DIR')
 
from dash.contrib.plugins.image.conf import get_setting
 
FIT_METHOD_CROP_SMART = get_setting('FIT_METHOD_CROP_SMART')
FIT_METHOD_CROP_CENTER = get_setting('FIT_METHOD_CROP_CENTER')
FIT_METHOD_CROP_SCALE = get_setting('FIT_METHOD_CROP_SCALE')
FIT_METHOD_FIT_WIDTH = get_setting('FIT_METHOD_FIT_WIDTH')