Ignore:
Timestamp:
27 Jun 2010, 08:59:52 (14 years ago)
Author:
uli
Message:

Set required header fields for JAMB data as constant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/ulif-fasttables/src/waeup/sirp/jambtables/jambtables.py

    r5242 r5245  
    3030from BTrees.Length import Length
    3131
     32#: The header fields required for a valid JAMB table CSV file.
     33JAMB_DATA_HEADERS = [
     34    'firstname', 'lastname', 'middlenames', 'screening_type',
     35    'screening_venue', 'reg_no', 'sex', 'course1', 'jamb_state',
     36    'screening_date', 'jamb_lga', 'fst_sit_fname', 'date_of_birth']
     37
    3238def filter_data(datadict):
    3339    """Filter items whose key contains 'ignore'
     
    3844            continue
    3945        del datadict[key]
    40     for name in ['firstname', 'lastname', 'middlenames', 'screening_type',
    41                  'screening_venue', 'reg_no', 'sex', 'course1', 'jamb_state',
    42                  'screening_date', 'jamb_lga', 'fst_sit_fname',]:
     46    for name in JAMB_DATA_HEADERS:
    4347        datadict[name] = unicode(datadict[name])
    4448    datadict['date_of_birth'] = datetime.strptime(
Note: See TracChangeset for help on using the changeset viewer.