diff options
| author | Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> | 2018-05-25 20:53:13 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-05-25 21:32:27 -0400 |
| commit | ecb825abe24d27682041d7ff5eba1cca55d261f3 (patch) | |
| tree | d0a6facd781356928a2fdc38fa162c1026a3352e /docs/ref | |
| parent | 6b91152a103f7c5cbefcf44741e6b03611724714 (diff) | |
[2.1.x] Fixed #29423 -- Documented Field.value_from_object().
Backport of 4c35a173e881deaff17e5343181dcbc36177a4af from master
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/fields.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index c696b770b3..5fc785fb18 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1857,6 +1857,12 @@ Field API reference Besides saving to the database, the field also needs to know how to serialize its value: + .. method:: value_from_object(obj) + + Returns the field's value for the given model instance. + + This method is often used by :meth:`value_to_string`. + .. method:: value_to_string(obj) Converts ``obj`` to a string. Used to serialize the value of the field. |
