- Timestamp:
- 25 Apr 2009, 13:48:19 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/student/studentcontainer.py
r3951 r4083 1 1 import grok 2 2 import os 3 from zope.component.interfaces import IFactory 4 from zope.interface import implementedBy 3 5 from waeup.interfaces import IStudentContainer 4 6 from waeup.utils import importexport as csv … … 11 13 grok.implements(IStudentContainer) 12 14 15 class StudentContainerFactory(grok.GlobalUtility): 16 """A factory for faculty containers. 17 """ 18 grok.implements(IFactory) 19 grok.name(u'waeup.StudentContainer') 20 title = u"Create a new student container.", 21 description = u"This factory instantiates new student containers." 22 23 def __call__(self): 24 return StudentContainer() 25 26 def getInterfaces(self): 27 return implementedBy(StudentContainer) 13 28 14 29 class Import(grok.View): … … 38 53 csv.writeFile(result) 39 54 return "yeah %s" % t[0] 40 41 grok.global_utility(StudentContainer, provides=IStudentContainer)
Note: See TracChangeset for help on using the changeset viewer.