示例#1
0
 def save(self):
     """
         is sent to the class UserCode parameter of 20 and 8 for the number
         of codes and code length.
     """
     bulk = Bulk(); values = []; self.cod = UserCode(20,8)
     self.codes = self.cod.generateCodes()
     for i in range(len(self.codes)):values.append(CreateCodes(franchisee = self.franchisee, code = self.codes[i], useFlagCode = False, dateUseFlag = None, dateCreateCode = datetime.now()))
     bulk.insertMany(CreateCodes,values)