Ignore:
Timestamp:
17 Dec 2011, 12:54:39 (13 years ago)
Author:
Henrik Bettermann
Message:

Define two different (convenience?) methods: fullname and display_fullname. The first one is a hyphen-separated string of all name parts and is meant for indexing only. The second one uses the SIRPUtils fullname method and is meant for displaying the fullname in the UI. It can be easily customized according to the requirements of the school.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py

    r7359 r7364  
    2020import grok
    2121import smtplib
     22from string import capwords
    2223from email.mime.text import MIMEText
    2324from waeup.sirp.interfaces import ISIRPUtils
     
    5758        # We do not necessarily have the middlename attribute
    5859        if middlename:
    59             return '%s %s %s' % (firstname, middlename, lastname)
     60            return capwords('%s %s %s' % (firstname, middlename, lastname))
    6061        else:
    61             return '%s %s' % (firstname, lastname)
     62            return capwords('%s %s' % (firstname, lastname))
Note: See TracChangeset for help on using the changeset viewer.