summaryrefslogtreecommitdiff
path: root/docs/topics/forms
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2014-02-09 11:38:13 +0000
committerTim Graham <timograham@gmail.com>2014-02-13 07:12:40 -0500
commit8aa1efff6d6cb1589a1977f3e68f4c26eb6adc74 (patch)
treed75b3a6366e036dcf72313b65b165c8189421812 /docs/topics/forms
parentc3434fed5bb223b2765a85f88053d42b70d81ad9 (diff)
Fixed #21951 -- Updated docs to use __str__ for Python 3
Thanks Tim Graham for the report and recommendations
Diffstat (limited to 'docs/topics/forms')
-rw-r--r--docs/topics/forms/modelforms.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index 1cac2d6e7e..6222f342b4 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -162,8 +162,7 @@ Consider this set of models::
title = models.CharField(max_length=3, choices=TITLE_CHOICES)
birth_date = models.DateField(blank=True, null=True)
- # On Python 3: def __str__(self):
- def __unicode__(self):
+ def __str__(self): # __unicode__ on Python 2
return self.name
class Book(models.Model):