Ignore:
Timestamp:
16 Dec 2011, 07:32:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement fullname constructor as a global utility method which can easily be subject to customization. I think it's better to leave this here rather than selecting the constructor method via the customization object.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/utils
Files:
2 edited

Legend:

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

    r7358 r7359  
    2323import shutil
    2424import grok
    25 import smtplib
    26 from email.mime.text import MIMEText
    2725from cStringIO import StringIO
    2826from docutils.core import publish_string
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py

    r7358 r7359  
    5353        server.quit()
    5454        return True
     55
     56    def fullname(self,firstname,lastname,middlename=None):
     57        # We do not necessarily have the middlename attribute
     58        if middlename:
     59            return '%s %s %s' % (firstname, middlename, lastname)
     60        else:
     61            return '%s %s' % (firstname, lastname)
Note: See TracChangeset for help on using the changeset viewer.