Changeset 7359 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 16 Dec 2011, 07:32:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r7357 r7359 21 21 import os 22 22 import grok 23 from zope.component import getUtility 23 24 from zope.component.interfaces import IFactory 24 25 from zope.interface import implementedBy … … 26 27 from zope.securitypolicy.interfaces import IPrincipalRoleManager 27 28 from waeup.sirp.interfaces import ( 28 IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler) 29 IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler, 30 ISIRPUtils) 29 31 from waeup.sirp.image import SIRPImageFile 30 32 from waeup.sirp.imagestorage import DefaultFileStoreHandler … … 63 65 @property 64 66 def fullname(self): 65 # We do not necessarily have the middlename attribute66 67 middlename = getattr(self, 'middlename', None) 67 if middlename: 68 return '%s %s %s' % (self.firstname, 69 middlename, self.lastname) 70 else: 71 return '%s %s' % (self.firstname, self.lastname) 68 sirp_utils = getUtility(ISIRPUtils) 69 return sirp_utils.fullname(self.firstname, self.lastname, middlename) 72 70 73 71 @property
Note: See TracChangeset for help on using the changeset viewer.