From 8aa1efff6d6cb1589a1977f3e68f4c26eb6adc74 Mon Sep 17 00:00:00 2001 From: Alasdair Nicol Date: Sun, 9 Feb 2014 11:38:13 +0000 Subject: Fixed #21951 -- Updated docs to use __str__ for Python 3 Thanks Tim Graham for the report and recommendations --- docs/topics/forms/modelforms.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs/topics/forms') 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): -- cgit v1.3