Changeset 8603


Ignore:
Timestamp:
2 Jun 2012, 17:36:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Capitalize names separated by hyphens.

File:
1 edited

Legend:

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

    r8436 r8603  
    180180        # We do not necessarily have the middlename attribute
    181181        if middlename:
    182             return string.capwords(
    183                 '%s %s %s' % (firstname, middlename, lastname))
     182            name = '%s %s %s' % (firstname, middlename, lastname)
    184183        else:
    185             return string.capwords(
    186                 '%s %s' % (firstname, lastname))
     184            name = '%s %s' % (firstname, lastname)
     185        return string.capwords(name.replace('-',' - ')).replace(' - ','-')
     186
    187187
    188188    def genPassword(self, length=8, chars=string.letters + string.digits):
Note: See TracChangeset for help on using the changeset viewer.