Changeset 6439 for main/waeup.sirp/trunk


Ignore:
Timestamp:
20 Jun 2011, 22:50:48 (14 years ago)
Author:
uli
Message:

Update access code archiving.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py

    r6432 r6439  
    170170            )
    171171        writer = csv.writer(open(csv_path, 'w'), quoting=csv.QUOTE_ALL)
    172         writer.writerow(['prefix', 'serial', 'ac', 'date'])
     172        writer.writerow(['prefix', 'serial', 'ac', 'used',
     173                         'disabled', 'history'])
    173174        writer.writerow([self.prefix, '%0.2f' % self.cost, str(self.num),
    174175                         str(self.entry_num)])
     
    179180            writer.writerow([
    180181                    self.prefix, value.batch_serial, value.representation,
     182                    value.used and '1' or '0', value.disabled and '1' or '0',
     183                    value.history
    181184                    ])
    182185        return os.path.basename(csv_path)
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt

    r6425 r6439  
    303303and have a slightly different format therefore.
    304304
    305     >>> archive_file = os.path.join(ac_storage, 
     305    >>> archive_file = os.path.join(ac_storage,
    306306    ...                             sorted(os.listdir(ac_storage))[-2])
    307307    >>> print open(archive_file, 'rb').read()
    308     "prefix","serial","ac","student","date"
     308    "prefix","serial","ac","used","disabled","history"
    309309    "BLA","19.12","1","3"
    310     "BLA","0","BLA-1-<10-DIGITS>","","..."
    311     "BLA","1","BLA-1-<10-DIGITS>","",""
    312     "BLA","2","BLA-1-<10-DIGITS>","",""
     310    "BLA","0","BLA-1-<10-DIGITS>","0","0","..."
     311    "BLA","1","BLA-1-<10-DIGITS>","0","0","..."
     312    "BLA","2","BLA-1-<10-DIGITS>","0","0","..."
    313313
    314314Clean up:
Note: See TracChangeset for help on using the changeset viewer.