mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #21951 -- Updated docs to use __str__ for Python 3
Thanks Tim Graham for the report and recommendations
This commit is contained in:
committed by
Tim Graham
parent
c3434fed5b
commit
8aa1efff6d
@@ -1047,7 +1047,7 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
|
||||
initial value, no empty choice is created (regardless of the value
|
||||
of ``empty_label``).
|
||||
|
||||
The ``__unicode__`` (``__str__`` on Python 3) method of the model will be
|
||||
The ``__str__`` (``__unicode__`` on Python 2) method of the model will be
|
||||
called to generate string representations of the objects for use in the
|
||||
field's choices; to provide customized representations, subclass
|
||||
``ModelChoiceField`` and override ``label_from_instance``. This method will
|
||||
|
||||
Reference in New Issue
Block a user