get val form settings and set to context
      {% load lbutils %}
      {% get_setting "key" default_val "as_key" %}
      {{ as_key }}
      if as_key is None, this tag will return val
975166
def get_setting(context, key, default_val="", as_key=None):
    
    if ("%s" % default_val).startswith('$.'):
        default_val = getattr(settings, default_val[2:])
    val = getattr(settings, key, default_val)
    if not as_key:
        return val
    context[as_key] = val
    return ''
171557
def get_context(self, name, value, attrs):
        """"""
        context = {}
        context['widget'] = {
            'name': name,
            'type': 'text',
            'is_hidden': self.is_hidden,
            'required': self.is_required,
            'value': self.format_value(value),
            'attrs': {**self.attrs, **(attrs or {})},
            'template_name': self.template_name,
        }
        return context
1237038
@Override
    public String getValue() {
        String value = attrMixin.getAttribute(VALUE);
        return value.isEmpty() ? getText() : value;
    }
1096346
def get(key, default=None):
    
    data = get_form() or get_query_string()
    return data.get(key, default)
755890
def var(name)
      s = Setting.where(:name => name).first
      return "" if s.nil?    
      return s.value
    end
106001
def get_value(self, context, obj, field_name):
        
        try:
            language = get_language()
            value = self.get_translated_value(obj, field_name, language)
            if value:
                return value
            if self.FALLBACK:
                for lang, lang_name in settings.LANGUAGES:
                    if lang == language:
                        # already tried this one...
                        continue
                    value = self.get_translated_value(obj, field_name, lang)
                    if value:
                        return value
            untranslated = getattr(obj, field_name)
            if self._is_truthy(untranslated):
                return untranslated
            else:
                return self.EMPTY_VALUE
        except Exception:
            if settings.TEMPLATE_DEBUG:
                raise
            return self.EMPTY_VALUE
616289
def setVal(self, name, val):
        
        if self._autoFixNames:
            name = self._fixName(name)
        self._fieldValDict[name] = val
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
287816
def value(self, key, default=None):
        
        if self._customFormat:
            return self._customFormat.value(key, default)
        else:
            return unwrapVariant(super(XSettings, self).value(key))
84861
def get(self, param, default=EMPTY):
        
        if not self.has(param):
            if default is not EMPTY:
                return default
            raise ParamNotFoundException("value for %s not found" % param)
        context_dict = copy.deepcopy(self.manifest.get_context_dict())
        for k, v in self.raw_dict.items():
            context_dict["%s:%s" % (self.feature_name, k)] = v
        cur_value = self.raw_dict[param]
        prev_value = None
        max_depth = 5
        # apply the context until doing so does not change the value
        while cur_value != prev_value and max_depth > 0:
            prev_value = cur_value
            try:
                cur_value = str(prev_value) % context_dict
            except KeyError:
                e = sys.exc_info()[1]
                key = e.args[0]
                if key.startswith('config:'):
                    missing_key = key.split(':')[1]
                    if self.manifest.inputs.is_input(missing_key):
                        val = self.manifest.inputs.get_input(missing_key)
                        context_dict[key] = val
                else:
                    logger.warn("Could not specialize %s! Error: %s" % (self.raw_dict[param], e))
                    return self.raw_dict[param]
            except ValueError:
                # this is an esoteric error, and this implementation
                # forces a terrible solution. Sorry.
                # using the standard escaping syntax in python is a mistake.
                # if a value has a "%" inside (e.g. a password), a ValueError
                # is raised, causing an issue
                return cur_value
            max_depth -= 1
        return cur_value
561831
def _setVal(self, name, val, defVal = None):
        """"""
        if val == defVal:
            return
        if not hasattr(self, "vals"):
            self.vals = {}
        self.vals[name] = val
728174
def get(self, key, default=None, msg_if_none=None):
        
        out = getattr(self, key, default)

        if (out is None) and (msg_if_none is not None):
            raise ValueError(msg_if_none)

        return out
1060402
def get(self, key, *val):
        
        data = self.get_data()
        if data is not None:
            return data.get(key, *val)
        if val:
            return val[0]
        raise KeyError(key)
664523
def validate(self, val):
        
        self.validate_type_only(val)
        if not hasattr(val, '_tag') or val._tag is None:
            raise ValidationError('no tag set')
        return val
63860
def get_setting(self, twig=None, **kwargs):
        
        if twig is not None:
            kwargs['twig'] = twig
        kwargs['context'] = 'setting'
        return self.filter_or_get(**kwargs)
1196976
def tag_value(self, p_key, p_default=None):
        
        return self.tag_values(p_key)[0] if p_key in self.fields['tags'] else p_default
900953
def get_value(self, dictionary):
        
        # We override the default field access in order to support
        # lists in HTML forms.
        if html.is_html_input(dictionary):
            return html.parse_html_list(dictionary, prefix=self.field_name)
        return dictionary.get(self.field_name, empty)