Changeset 17965
- Timestamp:
- 27 Nov 2024, 02:19:52 (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/export.py
r17857 r17965 27 27 INigeriaUGApplicant, INigeriaPGApplicant, IBankAccount) 28 28 from waeup.uniben.applicants.interfaces import ( 29 IUnibenRegistration, ITranscriptApplicant, IFrenchApplicant) 29 IUnibenRegistration, ITranscriptApplicant, 30 IFrenchApplicant, IAfrimalApplicant) 30 31 31 32 class CustomApplicantExporter(NigeriaApplicantExporter): … … 40 41 iface_names(ITranscriptApplicant) + 41 42 iface_names(IFrenchApplicant) + 43 iface_names(IAfrimalApplicant) + 42 44 iface_names(IBankAccount) 43 45 ))) + ( … … 99 101 return self.close_outfile(filepath, outfile) 100 102 103 class AfrimalApplicantExporter(CustomApplicantExporter): 104 """ 105 """ 106 107 grok.name('afrimal_applicants') 108 title = 'AFRIMAL Applicants' 109 110 fields = tuple(sorted(set( 111 iface_names(IAfrimalApplicant) 112 ))) + ( 113 'password', 'state', 'history', 'container_code', 'application_number', 114 'display_fullname', 'application_date') 115 116 def export(self, applicants, filepath=None): 117 """Exports afrimal applicants only 118 """ 119 writer, outfile = self.get_csv_writer(filepath) 120 for applicant in applicants: 121 if applicant.__parent__.code.startswith('afrimal'): 122 self.write_item(applicant, writer) 123 return self.close_outfile(filepath, outfile) 124 101 125 class TranscriptApplicantExporter(CustomApplicantExporter): 102 126 """
Note: See TracChangeset for help on using the changeset viewer.