db.models.Field.to_python()

to_python(value) [source]

Converts the value into the correct Python object. It acts as the reverse of value_to_string(), and is also called in clean().

See Converting values to Python objects for usage.

Besides saving to the database, the field also needs to know how to serialize its value:

doc_Django
2016-10-09 18:35:30
Comments
Leave a Comment

Please login to continue.