Changeset 5583 for WAeUP_SRP/trunk/WAeUPTables.py
- Timestamp:
- 10 Nov 2010, 08:57:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTables.py
r5581 r5583 775 775 return 776 776 fields = [field for field in self.schema()] 777 export_fields = ['username','firstname','lastname','email','current _session','reg_state','password']777 export_fields = ['username','firstname','lastname','email','currentsession','regstate','password','city','country','deleted'] 778 778 format = ','.join(['"%%(%s)s"' % fn for fn in export_fields]) 779 779 csv = [] … … 787 787 if len(records) == 0: 788 788 raise KeyError("No record for uid %s" % uid) 789 rec = self.record2dict(fields,records[0],None) 790 rec['firstname'] = rec['firstname'] + rec['middlename'] 791 rec.update({'reg_state':rec['review_state']}) 792 rec['current_session'] = rec['session'] 789 rec = self.record2dict(fields,records[0],None) 790 fn = rec['firstname'].replace(',',' ') 791 mn = rec['middlename'].replace(',',' ') 792 ln = rec['lastname'].replace(',',' ') 793 rec['firstname'] = fn + ' ' + mn 794 rec['lastname'] = ln 795 rec['regstate'] = rec['review_state'] 796 rec['currentsession'] = rec['session'] 793 797 rec['username'] = rec['id'] 798 rec['city'] = '' 799 rec['country'] = 'ng' 800 rec['deleted'] = '0' 794 801 rec['password'] = self.waeup_tool.getCredential(rec['id']) 795 802 csv.append(format % rec)
Note: See TracChangeset for help on using the changeset viewer.