Changeset 490
- Timestamp:
- 7 Sep 2006, 13:30:36 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r489 r490 45 45 security = ClassSecurityInfo() 46 46 47 def __init__(self,**kw): 47 def __init__(self,id,**kw): 48 CPSDocument.__init__(self,id,**kw) 48 49 self.table = PinTable() 49 CPSDocument.__init__(self, kw)50 50 51 51 security.declareProtected(View,"Title") … … 65 65 for i in range(nr): 66 66 pin = "%d%d" % (b_no,r.randint(999999999,1000000000)) 67 while self.table.searchResults(uid=pin): 68 pin = "%d%d" % (b_no,r.randint(999999999,1000000000)) 69 table.addRecord(pin=pin,serial=i,student="") 67 import pdp;pdb.set_trace() 68 while len(res) > 0: 69 pin = "%d%d" % (b_no,r.randint(9999,1000000000)) 70 res = self.table.searchResults(uid=pin) 71 self.table.addRecord(pin=pin,serial=i,student="") 70 72 print i,pin 71 73 -
WAeUP_SRP/trunk/WAeUPTables.py
r440 r490 86 86 def addRecord(self, **data): 87 87 # The uid is the same as "bed". 88 uid = data[' bed']88 uid = data['pin'] 89 89 self.catalog_object(dict2ob(data), uid=uid) 90 90 return uid
Note: See TracChangeset for help on using the changeset viewer.