add property to get deputy birth date formatted as d/m/y

This commit is contained in:
Frédéric Péters 2011-11-02 10:29:07 +01:00
parent 17e683eed2
commit bac1123b1a
1 changed files with 6 additions and 0 deletions

View File

@ -101,3 +101,9 @@ class Deputy(Item):
return 'd60-70'
else:
return 'p70'
#property
def formatted_birthdate(self):
if not self.birthdate:
return ''
return self.birthdate.strftime('%d/%m/%Y')