From 7442eb1a242ecf9d186d4e7de1b94e360e04782d Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 4 Jul 2013 15:19:33 +0200 Subject: Fixed #20224 -- Update docs examples which mention __unicode__ Thanks Marc Tamlyn and Tim Graham for the review. --- docs/intro/overview.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/intro') diff --git a/docs/intro/overview.txt b/docs/intro/overview.txt index 77838ffcaa..55366fb2c6 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -31,6 +31,7 @@ the file ``mysite/news/models.py``:: class Reporter(models.Model): full_name = models.CharField(max_length=70) + # On Python 3: def __str__(self): def __unicode__(self): return self.full_name @@ -40,6 +41,7 @@ the file ``mysite/news/models.py``:: content = models.TextField() reporter = models.ForeignKey(Reporter) + # On Python 3: def __str__(self): def __unicode__(self): return self.headline -- cgit v1.3