Ticket #11141: 11141.diff

File 11141.diff, 551 bytes (added by Chris Beaven, 15 years ago)
  • docs/ref/contrib/admin/index.txt

     
    347347              birthday = models.DateField()
    348348
    349349              def born_in_fifties(self):
    350                   return self.birthday.strftime('%Y')[:3] == 5
     350                  return self.birthday.strftime('%Y')[:3] == '195'
    351351              born_in_fifties.boolean = True
    352352
    353353          class PersonAdmin(admin.ModelAdmin):
Back to Top