Changeset 17086 for main/kofacustom.lpng/trunk/src/kofacustom
- Timestamp:
- 7 Sep 2022, 08:39:42 (2 years ago)
- Location:
- main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/interfaces.py
r17073 r17086 20 20 21 21 from zope import schema 22 import unicodecsv 23 import os 22 24 from zope.interface import Interface, Attribute, implements, directlyProvides 23 25 from waeup.kofa.applicants.interfaces import ( … … 38 40 INigeriaApplicantOnlinePayment,) 39 41 42 def make_dict(filename, depth): 43 wards = unicodecsv.reader( 44 open(os.path.dirname(__file__) + '/%s'%filename, 'rb')) 45 result = dict() 46 for row in wards: 47 result['_'.join(row[0:depth])] = row[depth] 48 return result 49 50 STATES = make_dict('states.csv', 1) 51 LGAS = make_dict('lgas.csv', 2) 52 WARDS = make_dict('wards.csv', 3) 53 PUNITS = make_dict('punits.csv', 4) 54 40 55 class IApplicantBaseData(IKofaObject): 41 56 """This is a base interface of an applicant with no field
Note: See TracChangeset for help on using the changeset viewer.