Ticket #827: docs.diff
File docs.diff, 1.1 KB (added by , 19 years ago) |
---|
-
docs/tutorial02.txt
331 331 You can click on the column headers to sort by those values -- except in the 332 332 case of the ``was_published_today`` header, because sorting by the output of 333 333 an 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 335 underscores replaced with spaces). But you can change that by giving that 336 method a ``short_description`` attribute:: 336 337 337 338 def was_published_today(self): 338 339 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?' 340 341 341 342 342 343 Let's add another improvement to the Poll change list page: Filters. Add the