Author: timo Date: 2012-02-18 13:50:48 -0800 (Sat, 18 Feb 2012) New Revision: 17550
Modified: django/trunk/docs/intro/tutorial02.txt Log: Fixed #17706 - Improved short description example in Tutorial 2; thanks xbito and claudep. Modified: django/trunk/docs/intro/tutorial02.txt =================================================================== --- django/trunk/docs/intro/tutorial02.txt 2012-02-18 21:40:26 UTC (rev 17549) +++ django/trunk/docs/intro/tutorial02.txt 2012-02-18 21:50:48 UTC (rev 17550) @@ -356,9 +356,11 @@ underscores replaced with spaces). But you can change that by giving that method (in ``models.py``) a ``short_description`` attribute:: - def was_published_today(self): - return self.pub_date.date() == datetime.date.today() - was_published_today.short_description = 'Published today?' + class Poll(models.Model): + # ... + def was_published_today(self): + return self.pub_date.date() == datetime.date.today() + was_published_today.short_description = 'Published today?' Edit your admin.py file again and add an improvement to the Poll change list page: Filters. Add the following line to ``PollAdmin``:: -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.