from importlib import import_module


def update_settings_from_module(settings, module):
    """Updates a given settings dict from a module denoted by a dotted path.
    :param dict settings:
    :param str module:
    """

    settings_module = import_module(module)

    settings_dict = {
        key: value
        for key, value in settings_module.__dict__.items()
        if key.upper() == key and not key.startswith('_')
    }
    settings.update(settings_dict)

    return settings