Ticket #17706: 17706-2.diff

File 17706-2.diff, 893 bytes (added by Claude Paroz, 13 years ago)

Updated indentation of the comment

  • docs/intro/tutorial02.txt

     
    356356underscores replaced with spaces). But you can change that by giving that
    357357method (in ``models.py``) a ``short_description`` attribute::
    358358
    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?'
    362364
    363365Edit your admin.py file again and add an improvement to the Poll change list page: Filters. Add the
    364366following line to ``PollAdmin``::
Back to Top