- Timestamp:
- 22 Feb 2012, 21:14:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/department.py
r7334 r7681 19 19 """ 20 20 import grok 21 from zope.component import createObject22 21 from zope.component.interfaces import IFactory 23 22 from zope.interface import implementedBy 23 from zope.component import getUtility 24 from waeup.sirp.university.coursescontainer import CoursesContainer 25 from waeup.sirp.university.certificatescontainer import CertificatesContainer 26 from waeup.sirp.interfaces import ISIRPUtils 24 27 from waeup.sirp.university.interfaces import IDepartment, IDepartmentAdd 25 from waeup.sirp.university.vocabularies import inst_types26 28 27 29 class Department(grok.Container): … … 53 55 self.title_prefix = title_prefix 54 56 self.code = code 55 self.courses = createObject(u'waeup.CoursesContainer')57 self.courses = CoursesContainer() 56 58 self.courses.__parent__ = self 57 59 self.courses.__name__ = 'courses' 58 self.certificates = createObject(u'waeup.CertificatesContainer')60 self.certificates = CertificatesContainer() 59 61 self.certificates.__parent__ = self 60 62 self.certificates.__name__ = 'certificates' … … 71 73 72 74 def longtitle(self): 75 insttypes_dict = getUtility(ISIRPUtils).getInstTypeDict() 73 76 return "%s %s (%s)" % ( 74 inst _types.getTerm(self.title_prefix).title,77 insttypes_dict[self.title_prefix], 75 78 self.title, self.code) 76 79
Note: See TracChangeset for help on using the changeset viewer.