Ticket #827: docs.diff

File docs.diff, 1.1 KB (added by aaronsw, 10 years ago)

patch to the tutorial docs

  • docs/tutorial02.txt

    331331You can click on the column headers to sort by those values -- except in the
    332332case of the ``was_published_today`` header, because sorting by the output of
    333333an arbitrary method is not supported. Also note that the column header for
    334 ``was_published_today`` is, by default, the name of the method. But you can
    335 change that by giving that method a ``short_description`` attribute::
     334``was_published_today`` is, by default, the name of the method (with
     335underscores replaced with spaces). But you can change that by giving that
     336method a ``short_description`` attribute::
    337338    def was_published_today(self):
    338339        return self.pub_date.date() == datetime.date.today()
    339     was_published_today.short_description = 'Was published today'
     340    was_published_today.short_description = 'Published today?'
    342343Let's add another improvement to the Poll change list page: Filters. Add the
Back to Top