[Django]-When does Django's custom model field method to_python get anything other than an instance?

1👍

I’ve found one place where to_python ends up with something other than an instance – in the case where the value is not provided (for example, if your field is set up to allow null). In that case, because I’d implemented get_prep_value badly, to_python got passed a string containing None.

Leave a comment