Changeset 16317 for main/waeup.uniben/trunk/src/waeup/uniben
- Timestamp:
- 15 Nov 2020, 19:41:33 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/export.py
r16078 r16317 51 51 return super(CustomApplicantPaymentExporter, self).fields + ( 52 52 'r_pay_reference',) 53 54 class PGApplicantExporter(NigeriaApplicantExporter): 55 """Exports pg applicants only. 56 """ 57 58 grok.name('pg_applicants') 59 title = 'PG Applicants' 60 61 def is_postgrad(self, applicant): 62 course_studied = getattr(applicant, 'course_studied', None) 63 if course_studied and (course_studied.study_mode.startswith('pg') 64 or course_studied.study_mode.startswith('special_pg')): 65 return True 66 return False 67 68 def export(self, applicants, filepath=None): 69 """ 70 """ 71 writer, outfile = self.get_csv_writer(filepath) 72 for applicant in applicants: 73 if self.is_postgrad(applicant): 74 self.write_item(applicant, writer) 75 return self.close_outfile(filepath, outfile)
Note: See TracChangeset for help on using the changeset viewer.