- Timestamp:
- 17 Apr 2012, 12:14:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/applicant.py
r8020 r8196 23 23 from waeup.kofa.utils.helpers import attrs_to_fields 24 24 from waeup.uniben.applicants.interfaces import( 25 I Applicant, IUGApplicantEdit, IPGApplicantEdit)25 ICustomApplicant, IUGApplicantEdit, IPGApplicantEdit) 26 26 27 class Applicant(Applicant):27 class CustomApplicant(Applicant): 28 28 29 grok.implements(I Applicant, IUGApplicantEdit, IPGApplicantEdit)30 grok.provides(I Applicant)29 grok.implements(ICustomApplicant, IUGApplicantEdit, IPGApplicantEdit) 30 grok.provides(ICustomApplicant) 31 31 32 32 # Set all attributes of Applicant required in IApplicant as field … … 34 34 # ourselves and as a bonus we get free validation when an attribute is 35 35 # set. 36 Applicant = attrs_to_fields(Applicant)36 CustomApplicant = attrs_to_fields(CustomApplicant) 37 37 38 class ApplicantFactory(ApplicantFactory):38 class CustomApplicantFactory(ApplicantFactory): 39 39 """A factory for customized applicants. 40 40 """ 41 41 42 42 def __call__(self, *args, **kw): 43 return Applicant()43 return CustomApplicant() 44 44 45 45 def getInterfaces(self): 46 return implementedBy( Applicant)46 return implementedBy(CustomApplicant)
Note: See TracChangeset for help on using the changeset viewer.