def _validate_kwargs(self, model_class, kwargs): "validate all kwargs match Model.fields." for field_name in kwargs.keys(): if field_name in self._DDF_CONFIGS: continue if not model_has_the_field(model_class, field_name): raise InvalidConfigurationError('Field "%s" does not exist.' % field_name), None, sys.exc_info()[2]
def _validate_kwargs(self, model_class, kwargs): "validate all kwargs match Model.fields." for field_name in kwargs.keys(): if field_name in self._DDF_CONFIGS: continue if not model_has_the_field(model_class, field_name): raise InvalidConfigurationError('Field "%s" does not exist.' % field_name)