summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-25 13:28:12 -0400
committerTim Graham <timograham@gmail.com>2015-09-25 13:28:12 -0400
commitde99f558d806a2a1b30072ec95bc44d412d80dab (patch)
treec4ce0c9de1c22aca12544278fac1e7c0898b8595 /docs/topics
parentc42123adb166fd297116880a5322e4e17b11e33f (diff)
Fixed #25462 -- Removed Model.__unicode__() in favor of @python_2_unicode_compatible.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/models.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index ed13e46374..53d2396f03 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -756,9 +756,6 @@ You can override most of these -- see `overriding predefined model methods`_,
below -- but there are a couple that you'll almost always want to define:
:meth:`~Model.__str__` (Python 3)
- Python 3 equivalent of ``__unicode__()``.
-
-:meth:`~Model.__unicode__` (Python 2)
A Python "magic method" that returns a unicode "representation" of any
object. This is what Python and Django will use whenever a model
instance needs to be coerced and displayed as a plain string. Most
@@ -768,6 +765,9 @@ below -- but there are a couple that you'll almost always want to define:
You'll always want to define this method; the default isn't very helpful
at all.
+``__unicode__()`` (Python 2)
+ Python 2 equivalent of ``__str__()``.
+
:meth:`~Model.get_absolute_url`
This tells Django how to calculate the URL for an object. Django uses
this in its admin interface, and any time it needs to figure out a URL