Changeset 8196
- Timestamp:
- 17 Apr 2012, 12:14:03 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Files:
-
- 5 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) -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r8187 r8196 31 31 from waeup.uniben.interfaces import MessageFactory as _ 32 32 33 class RequestCallbackActionButton(RequestCallbackActionButton):33 class CustomRequestCallbackActionButton(RequestCallbackActionButton): 34 34 """ Do not display the base package callback button in custom pages. 35 35 """ … … 38 38 return '' 39 39 40 class OnlinePaymentCallbackPage(OnlinePaymentCallbackPage):40 class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 41 41 """ Neutralize callback simulation view 42 42 """ … … 44 44 return 45 45 46 class PDFApplicationSlip(PDFApplicationSlip):46 class CustomPDFApplicationSlip(PDFApplicationSlip): 47 47 48 48 @property … … 57 57 return form_fields 58 58 59 class ApplicantDisplayFormPage(ApplicantDisplayFormPage):59 class CustomApplicantDisplayFormPage(ApplicantDisplayFormPage): 60 60 """A display view for applicant data. 61 61 """ … … 72 72 return form_fields 73 73 74 class ApplicantManageFormPage(ApplicantManageFormPage):74 class CustomApplicantManageFormPage(ApplicantManageFormPage): 75 75 """A full edit view for applicant data. 76 76 """ … … 87 87 return form_fields 88 88 89 class ApplicantEditFormPage(ApplicantEditFormPage):89 class CustomApplicantEditFormPage(ApplicantEditFormPage): 90 90 """An applicant-centered edit view for applicant data. 91 91 """ -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/export.py
r8056 r8196 23 23 from waeup.uniben.applicants.interfaces import IUGApplicant, IPGApplicant 24 24 25 class ApplicantsExporter(ApplicantsExporter):25 class CustomApplicantsExporter(ApplicantsExporter): 26 26 """Exporter for Uniben Applicants. 27 27 """ -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8184 r8196 224 224 225 225 226 class I Applicant(IUGApplicant,IPGApplicant):226 class ICustomApplicant(IUGApplicant,IPGApplicant): 227 227 """An interface for both types of applicants. 228 228 -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py
r8130 r8196 34 34 from waeup.kofa.interfaces import IBatchProcessor 35 35 from waeup.uniben.testing import FunctionalLayer 36 from waeup.uniben.applicants.export import ApplicantsExporter36 from waeup.uniben.applicants.export import CustomApplicantsExporter 37 37 38 38 … … 187 187 # set values we can expect in export file 188 188 self.applicant = self.setup_applicant(self.applicant) 189 exporter = ApplicantsExporter()189 exporter = CustomApplicantsExporter() 190 190 exporter.export_all(self.app, self.outfile) 191 191 result = open(self.outfile, 'rb').read()
Note: See TracChangeset for help on using the changeset viewer.