def set_value(model_instance, json):
return setattr(model_instance, self.attname, dumps(json))
setattr(cls, 'set_%s_value' % self.name, set_value)
def set_value(model_instance, json):
return setattr(model_instance, self.attname, dumps(json))
setattr(cls, 'set_%s_value' % self.name, set_value)