Commit 9729ad74 authored by Timo Graham's avatar Timo Graham
Browse files

[1.3.X] Fixed #17706 - Improved short description example in Tutorial 2; thanks xbito and claudep.

Backport of r17550 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 5144f72b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -343,6 +343,8 @@ an arbitrary method is not supported. Also note that the column header for
underscores replaced with spaces). But you can change that by giving that
method (in ``models.py``) a ``short_description`` attribute::

    class Poll(models.Model):
        # ...
        def was_published_today(self):
            return self.pub_date.date() == datetime.date.today()
        was_published_today.short_description = 'Published today?'