Fills the fields referenced by kwargs keys and fill them with
        the value
13243
def fill_fields(self, **kwargs):
        """"""
        for name, value in kwargs.items():
            field = getattr(self, name)
            field.send_keys(value)
971921
def fill(self, *args, **kwargs):
        
        self.fill_kwargs(**kwargs)
        self.fill_arg(*args)
        self.assert_full()
        return self
728542
def update_field(self, name, value):
        
        kwargs = {}
        kwargs['field.' + name] = value
        return self.post(**kwargs)
702389
def fill_arg(self, *args):
        
        missing = self.missing_vars()
        if len(args) == len(missing) == 1:
            self.setval(missing[0], args[0])
753925
def _assign_kwargs(self, kwargs):
    
    for k in kwargs:
        if not hasattr(self, k):
            raise AttributeError(k, 'Not valid for', self.__class__.__name__)
        setattr(self, k, kwargs[k])
212349
def values(self, *args: str, **kwargs: str) -> "ValuesQuery":
        
        fields_for_select = {}  # type: Dict[str, str]
        for field in args:
            if field in fields_for_select:
                raise FieldError("Duplicate key {}".format(field))
            fields_for_select[field] = field

        for return_as, field in kwargs.items():
            if return_as in fields_for_select:
                raise FieldError("Duplicate key {}".format(return_as))
            fields_for_select[return_as] = field

        return ValuesQuery(
            db=self._db,
            model=self.model,
            q_objects=self._q_objects,
            fields_for_select=fields_for_select,
            distinct=self._distinct,
            limit=self._limit,
            offset=self._offset,
            orderings=self._orderings,
            annotations=self._annotations,
            custom_filters=self._custom_filters,
        )
272383
def fix_additional_fields(data):
        """"""
        result = dict()
        for key, value in data.items():
            if isinstance(value, dict):
                result.update(KserSpan.to_flat_dict(key, value))
            else:
                result[key] = value
        return result
243873
def _remap_fields(cls, kwargs):
        """"""
        mapped = {}
        for key in kwargs:
            if key in cls._remap:
                mapped[cls._remap[key]] = kwargs[key]
            else:
                mapped[key] = kwargs[key]
        return mapped
1029764
def update(self, **kwargs):
        '''  '''
        redis = type(self).get_redis()
        errors = ValidationErrors()

        for fieldname, field in self.proxy:
            if not field.fillable:
                continue

            given = kwargs.get(fieldname)

            if given is None:
                continue

            try:
                value = field.validate(kwargs.get(fieldname), redis)
            except BadField as e:
                errors.append(e)
                continue

            setattr(
                self,
                fieldname,
                value
            )

        if errors.has_errors():
            raise errors

        return self.save()
1320063
private function fill()
    {
        foreach ($this->attributes as $key => $value) {
            $key = $this->camelCase($key);

            $this->{$key} = $value;
        }
    }
1073322
def _merge_args_with_kwargs(args_dict, kwargs_dict):
    """"""
    ret = args_dict.copy()
    ret.update(kwargs_dict)
    return ret
848757
def validate_fields(self, **kwargs):
        
        for field in self.fields:
            value = kwargs[field]
            required_type = self.fields[field]
            if type(value) != required_type:
                raise TypeError('{}.{} needs to be a {}, recieved: {}({})'.format(
                    self.name,
                    field,
                    required_type.__name__,
                    type(value).__name__,
                    value.__repr__()))
586692
def fill_inputs(values):
        
        name_map = {  # TODO: get rid of this crap
            "title_tags": "title",
            "subtitle_tags": "subtitle",
            "place_tags": "place",
            "lang_tags": "language",
            "keyword_tags": "keywords",
            "author_tags": "author",
            "publisher_tags": "publisher",
            "annotation_tags": "annotation",
            "creation_dates": "creation_date",
        }

        for remote_name in values.keys():
            # special adapter for aleph keyword view
            if remote_name == "keyword_tags":
                adder = ViewController.analysis_kw_handler.add_keyword
                for keyword in values[remote_name]:
                    adder(keyword["val"])
                continue

            local_name = name_map.get(remote_name, remote_name)
            setattr(ViewController, local_name, values[remote_name])
260524
def get_form_kwargs(self, key):
        
        kwargs = {
            'initial': self.get_initial(key),
            'prefix': self.get_prefix(key),
        }

        if self.request.method in ('POST', 'PUT'):
            kwargs.update({
                'data': self.request.POST,
                'files': self.request.FILES,
            })
        return kwargs
250926
def add_params(self, **kw):
        
        for k, v in kw.items():
            if (k not in self.params) and (k not in self.specific_params):
                raise ParameterError('"%s" is not a valid parameter for %s'
                                     % (k, self.__class__.__name__))
            try:
                self.params[k].validate(v)
            except KeyError:
                self.specific_params[k].validate(v)

        self._orig_kwargs.update(kw)
        self.kwargs = self._orig_kwargs.copy()
630599
def update_fields(fields)
      attributes[:id]        = fields['id'] || attributes[:id]
      attributes[:idPlugin]  = fields['idPlugin'] || attributes[:idPlugin]
      attributes[:scope]     = fields['scope'] || attributes[:scope]
      attributes[:value]     = JSON.parse(fields['value']).presence if fields.has_key?('value')
      attributes[:idModel]   = fields['idModel'] || attributes[:idModel]
      attributes[:access]    = fields['access'] || attributes[:access]
      self
    end
616710
def from_dict(cls, data, model):
        
        model_provided = model is not None
        result = {}
        for name, new_value in data.items():
            kwargs = {
                'name': name,
                'new_value': new_value,
            }
            if model_provided:
                kwargs['params'] = model.get_field_params(name)
            result[name] = cls(**kwargs)
        return result