Changeset 2191
- Timestamp:
- 11 Sep 2007, 12:40:17 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTables.py
r2189 r2191 97 97 if key == 'lga': 98 98 v = self.portal_vocabularies.local_gov_areas.get(v) 99 elif key == 'sex': 100 if v: 101 v = 'F' 102 else: 103 v = 'M' 99 104 d[key] = v 100 105 else: 101 106 d[key] = '' 102 107 return d 103 108 104 109 def addRecord(self, **data): ###( 105 110 # The uid is the same as "bed". … … 497 502 498 503 def searchAndSetRecord(self, uid, student_id,prefix): 499 500 # The following line must be activated after resetting the 501 # the portal_pins table. This is to avoid duplicate entries 504 505 # The following line must be activated after resetting the 506 # the portal_pins table. This is to avoid duplicate entries 502 507 # and disable duplicate payments. 503 508 504 509 #student_id = student_id.upper() 505 510 … … 595 600 WAeUPTable.__init__(self, name) 596 601 597 602 598 603 599 604 security.declareProtected(ModifyPortalContent,"new_importCSV")###( … … 640 645 em = 'Error reading %s.csv' % filename 641 646 logger.error(em) 642 return 647 return 643 648 d = self._import_new(csv_items,schema,layout,mode,logger) 644 649 imported = [] … … 672 677 for k in outlist[0].keys(): 673 678 d[k] = k 674 outlist[0] = d 679 outlist[0] = d 675 680 outfile = open("file_name_%s" % itype,'w') 676 681 csv.DictWriter(outfile,outlist[0].keys()).writerows(outlist)
Note: See TracChangeset for help on using the changeset viewer.