Returns either stored settings of a given user or default settings.
        This behavior reflects the need for views to have some settings at
        hand when running. The settings are returned as dict object.
777526
def get_user_data(user=None,group=None,data_kind=DINGOS_USER_DATA_TYPE_NAME):
        
        logger.debug("Get user settings called")

        if not user.is_authenticated():
            user = None

        try:
            user_config =  UserData.objects.get(user=user,group=group,data_kind=data_kind)
            return user_config.retrieve()
        except:
            return None
83625
def settings(self):
        """"""
        if not self.__settings:
            self.__settings = self.request('get', 'settings').json()
        return self.__settings
710340
def userSettings(self):
        
        if not self._userSettings:
            name = self.applicationName()
            if not self.isCompiled():
                name + '.dev'
            
            self._userSettings = XSettings(XSettings.YamlFormat,
                                           XSettings.UserScope,
                                           self.organizationName(),
                                           name)

        return self._userSettings
1015473
def get_settings(self):
    '''
    '''
    config = self._load_config_user()
    if self.name in config:
        return config[self.name]
45150
def __get_default_settings(self):
        

        LOGGER.debug("> Accessing '{0}' default settings file!".format(UiConstants.settings_file))
        self.__default_settings = QSettings(
            umbra.ui.common.get_resource_path(UiConstants.settings_file), QSettings.IniFormat)
555045
def get_default():
    

    if not is_configured():
        raise JutException('No configurations available, please run `jut config add`')

    for configuration in _CONFIG.sections():
        if _CONFIG.has_option(configuration, 'default'):
            return dict(_CONFIG.items(configuration))
1032728
async def get_settings(self) -> List[SettingsEntry]:
        
        settings = await self.request_settings_tree()
        return [SettingsEntry.make(**x) for x in settings["settings"]]
1119923
def getConf(cls, settings, options):
        ""
        ports = ['http_port', 'https_port', 'cache_port']
        for port_name in ports:
            port = getattr(settings, port_name.upper(), None)
            # only use the settings ports if the defaults were left unchanged
            default = getattr(defaults, port_name.upper())
            if port and options.get(port_name) == default:
                options[port_name] = port

        _opts = [
            ('key', 'hx_private_key'),
            ('cert', 'hx_certficate'),
            ('wsgi', 'wsgi_application')
        ]
        for opt_name, settings_name in _opts:
            opt = getattr(settings, settings_name.upper(), None)
            if opt:
                options[opt_name] = opt

        if not options['settings']:
            options['settings'] = environ['DJANGO_SETTINGS_MODULE']
        return options
81191
def settings(self):
        
        if not self._settings:
            data = self.query(Settings.key)
            self._settings = Settings(self, data)
        return self._settings
908078
def get_default_config_help(self):
        
        config_help = super(UsersCollector, self).get_default_config_help()
        config_help.update({
        })
        return config_help
772612
def _settings_from_file(self):
        """"""
        settings = load_source(
            'settings', text_type(self.user_dir.joinpath('settings.py')))
        return {key: getattr(settings, key)
                for key in const.DEFAULT_SETTINGS.keys()
                if hasattr(settings, key)}
845714
def defaults(current: dict, *args: AnyMapping) -> dict:
    
    """
    for data in args:
        for key, value in data.items():
            current.setdefault(key, value)
    return current
580908
def get_setting(setting):
    
    defaults = {
        # The context to use for rendering fields
        'TEMPLATE_FIELD_CONTEXT': {},
        # When this is False, don't do any TemplateField rendering
        'TEMPLATE_FIELD_RENDER': True
    }
    try:
        return getattr(settings, setting, defaults[setting])
    except KeyError:
        msg = "{0} is not specified in your settings".format(setting)
        raise ImproperlyConfigured(msg)
627264
def _get_settings(self):
        """"""
        url = self._global_settings_url
        payload = {}
        res = self._send_request('GET', url, payload, 'settings')
        if res and res.status_code in self._resp_ok:
            return res.json()
1046473
def get_user_if_exists(strategy, details, user=None, *args, **kwargs):
    """"""
    if user:
        return {'is_new': False}
    try:
        username = details.get('username')

        # Return the user if it exists
        return {
            'is_new': False,
            'user': User.objects.get(username=username)
        }
    except User.DoesNotExist:
        # Fall to the default return value
        pass

    # Nothing to return since we don't have a user
    return {}
221733
def get_user_data_iobject(user=None,group=None,data_kind=DINGOS_USER_DATA_TYPE_NAME):
        
        logger.debug("Get user settings called")

        if not user.is_authenticated():
            user = None
        try:
            user_config =  UserData.objects.get(user=user,group=group,data_kind=data_kind)
            return user_config.identifier.latest
        except:
            return None
1332108
def get_values():
    

    # First load a mapping between config name and default value
    default_initial = ((name, options[0])
                       for name, options in settings.CONFIG.items())
    # Then update the mapping with actually values from the backend
    initial = dict(default_initial, **dict(config._backend.mget(settings.CONFIG)))

    return initial