[Answered ]-Django1.1 model field value preprocessing before returning

1👍

You seem to have only read half the docs. As Pierre-Jean noted above, and even linked you to the correct part of the document, you need to define the reverse function, which is get_db_prep_value.

1👍

I think you should provide the reverse function to to_python.

Take a look at Django doc here : Converting Python objects to query value

Leave a comment