Changeset 17197
- Timestamp:
- 1 Dec 2022, 11:18:19 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/export.py
r16997 r17197 23 23 from kofacustom.nigeria.applicants.export import NigeriaApplicantExporter 24 24 from kofacustom.lpng.applicants.interfaces import ( 25 ICustomApplicant, )25 ICustomApplicant, STATES, LGAS, WARDS, PUNITS) 26 26 27 27 class CustomApplicantExporter(NigeriaApplicantExporter): … … 35 35 'password', 'state', 'history', 'container_code', 'application_number', 36 36 'display_fullname', 'application_date') 37 38 def mangle_value(self, value, name, context=None): 39 """The mangler determines the codes of the atributes `course1`, 40 `course2` and `course_admitted`. It furthermore prepares the 41 history messages and adds a hash symbol at the end of the phone number 42 to avoid annoying automatic number transformation by Excel or Calc. 43 """ 44 if name == 'federalstate': 45 value = STATES[value] 46 if name == 'lga': 47 value = LGAS[value] 48 if name == 'ward': 49 value = WARDS[value] 50 if name == 'punit': 51 value = PUNITS[value] 52 return super( 53 CustomApplicantExporter, self).mangle_value( 54 value, name, context=context)
Note: See TracChangeset for help on using the changeset viewer.