mail_module: joli name pour un adh
This commit is contained in:
parent
99983b69cc
commit
b6d3917ef7
1 changed files with 6 additions and 0 deletions
|
@ -36,7 +36,13 @@ def format_date(d):
|
||||||
else:
|
else:
|
||||||
return d.strftime('%A, %B %d %Y')
|
return d.strftime('%A, %B %d %Y')
|
||||||
|
|
||||||
|
def given_name(adh):
|
||||||
|
if 'club' in adh['objectClass']:
|
||||||
|
return u'Club %s' % unicode(adh['nom'][0])
|
||||||
|
return unicode(adh['prenom'][0]) + " " + unicode(adh['nom'][0])
|
||||||
|
|
||||||
templateEnv.filters['date'] = format_date
|
templateEnv.filters['date'] = format_date
|
||||||
|
templateEnv.filters['name'] = given_name
|
||||||
|
|
||||||
|
|
||||||
# file extension to rendering function map
|
# file extension to rendering function map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue