Hi There,
I am trying to use a custom model field with DRF. The custom field is essentially of the form
class CustomTextField(models.TextField):
def formfield(self):
....
def clean(self, value, instance):
return v.replace('help', "please") #lets say i do something like this
Running a trace on the PUT/POST view of DRF shows that the clean function is called and then the model instance is updated with the new value but when it finally saves the model, the "unclean" data is saved.
I'm a bit confused at this moment and would really appreciate if someone could explain this to me.
Thanks
This is a great app and i'm really looking forward to v2.