mirror of
https://github.com/django/django.git
synced 2025-08-09 21:38:18 +00:00
[1.6.x] Fixed #20224 -- Update docs examples which mention __unicode__
Thanks Marc Tamlyn and Tim Graham for the review.
Backport of 7442eb1a24
from master.
This commit is contained in:
parent
430aae1b0d
commit
a9dd6221af
24 changed files with 65 additions and 24 deletions
|
@ -710,9 +710,9 @@ smoothly:
|
|||
behavior of the field code is to call
|
||||
:func:`~django.utils.encoding.force_text` on the value. (In our
|
||||
examples in this document, ``value`` would be a ``Hand`` instance, not a
|
||||
``HandField``). So if your ``__unicode__()`` method automatically
|
||||
converts to the string form of your Python object, you can save yourself
|
||||
a lot of work.
|
||||
``HandField``). So if your ``__unicode__()`` method (``__str__()`` on
|
||||
Python 3) automatically converts to the string form of your Python object,
|
||||
you can save yourself a lot of work.
|
||||
|
||||
|
||||
Writing a ``FileField`` subclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue