Ignore:
Timestamp:
31 Jan 2008, 22:05:11 (17 years ago)
Author:
Henrik Bettermann
Message:

archiveBatch fixed (Joachim, wie konnte das bei dir funktionieren??)

archive file reorganized

pins_view and psm beautified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/ScratchCards.py

    r3076 r3077  
    143143        export_file = "%s/export/%s-%s_archive_%s.csv" % (i_home,prefix,batch_no,current)
    144144        lines = []
    145         fields = ['prefix','cost','serial','pin','student']
     145        fields = ['prefix','serial','pin','student']
    146146        headline = ','.join(fields)
    147147        out = open(export_file,"wb")
     148        out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n\n' % vars())
    148149        out.write(headline +'\n')
    149         out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n' % vars())
    150150        out.close()
    151151        out = open(export_file,"a")
     
    156156                                                                    batch_no,
    157157                                                                    len(pins)))
    158            
     158
    159159        pin_list = []
    160160        for pin in pins:
     
    167167        if delete:
    168168            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)
    171171            logger.info(msg)
    172172    ###)
Note: See TracChangeset for help on using the changeset viewer.