Changeset 3077 for WAeUP_SRP/base/ScratchCards.py
- Timestamp:
- 31 Jan 2008, 22:05:11 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/ScratchCards.py
r3076 r3077 143 143 export_file = "%s/export/%s-%s_archive_%s.csv" % (i_home,prefix,batch_no,current) 144 144 lines = [] 145 fields = ['prefix',' cost','serial','pin','student']145 fields = ['prefix','serial','pin','student'] 146 146 headline = ','.join(fields) 147 147 out = open(export_file,"wb") 148 out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n\n' % vars()) 148 149 out.write(headline +'\n') 149 out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n' % vars())150 150 out.close() 151 151 out = open(export_file,"a") … … 156 156 batch_no, 157 157 len(pins))) 158 158 159 159 pin_list = [] 160 160 for pin in pins: … … 167 167 if delete: 168 168 for pin in pin_list: 169 self. deleteRecord(pin)170 msg = "deleted % (total)d pin from pins_catalog" % len(pin_list)169 self.portal_pins.deleteRecord(pin) 170 msg = "deleted %d pin from portal_pins" % len(pin_list) 171 171 logger.info(msg) 172 172 ###)
Note: See TracChangeset for help on using the changeset viewer.