mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #20224 -- Update docs examples which mention __unicode__
Thanks Marc Tamlyn and Tim Graham for the review.
This commit is contained in:
parent
577b0f9189
commit
7442eb1a24
24 changed files with 65 additions and 24 deletions
|
@ -57,6 +57,7 @@ simple news application with an ``Article`` model::
|
|||
body = models.TextField()
|
||||
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
|
||||
|
||||
# On Python 3: def __str__(self):
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue