Ticket #17706: tuto02_short_description_ident.patch
File tuto02_short_description_ident.patch, 875 bytes (added by , 13 years ago) |
---|
-
docs/intro/tutorial02.txt
356 356 underscores replaced with spaces). But you can change that by giving that 357 357 method (in ``models.py``) a ``short_description`` attribute:: 358 358 359 def was_published_today(self): 360 return self.pub_date.date() == datetime.date.today() 361 was_published_today.short_description = 'Published today?' 359 class Poll(models.Model): 360 # ... 361 def was_published_today(self): 362 return self.pub_date.date() == datetime.date.today() 363 was_published_today.short_description = 'Published today?' 362 364 363 365 Edit your admin.py file again and add an improvement to the Poll change list page: Filters. Add the 364 366 following line to ``PollAdmin``::