mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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:
@@ -89,6 +89,7 @@ We'll be using these models::
|
||||
class Meta:
|
||||
ordering = ["-name"]
|
||||
|
||||
# On Python 3: def __str__(self):
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
@@ -98,6 +99,7 @@ We'll be using these models::
|
||||
email = models.EmailField()
|
||||
headshot = models.ImageField(upload_to='author_headshots')
|
||||
|
||||
# On Python 3: def __str__(self):
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user