- Timestamp:
- 25 Jan 2011, 01:07:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/jambtables/applicants.py
r5483 r5668 28 28 IResultEntry, IApplicant, IApplicantContainer, IApplicantPDEEditData 29 29 ) 30 from waeup.sirp.widgets.passportwidget import PassportImage 30 31 31 32 class ResultEntry(grok.Context): … … 37 38 38 39 class Applicant(grok.Context): 40 # class Applicant(grok.Model): 39 41 grok.implements(IApplicant, IApplicantPDEEditData) 40 42 grok.provides(IApplicant) … … 105 107 self.import_from = None 106 108 109 class ApplicantTraverser(grok.Traverser): 110 grok.context(IApplicant) 111 def traverse(self, name): 112 #passport_filename = self.context.passport.filename 113 passport_filename = getattr(self.context.passport, 'filename', None) 114 print "FILENAME: ", passport_filename 115 if name == passport_filename: 116 print "USE FILE", self.context.passport 117 return self.context.passport 118 if name == 'passport.jpg': 119 if self.context.passport is not None: 120 print "PP: ", self.context.passport 121 return self.context.passport 122 return PassportImage(None) 123 107 124 class ApplicantFactory(grok.GlobalUtility): 108 125 """A factory for faculty containers. … … 119 136 return implementedBy(Applicant) 120 137 121 138 122 139 class ApplicantContainer(grok.Container): 123 140 grok.implements(IApplicantContainer)
Note: See TracChangeset for help on using the changeset viewer.