Esempio n. 1
0
 def prefix_add(self, prefix, n, password_length=BATCH_DEFAULT_PASSWORD_LENGTH):
     self.save()
     users_list, user_password = prefix_generate_users(prefix, n, password_length)
     for u in users_list:
         u.save()
         self.users.add(u)
     f = generate_pdf(prefix, {'users': user_password})
     self.pdf = f
     self.full_clean()
     self.save()
Esempio n. 2
0
 def prefix_add(self,
                prefix,
                n,
                password_length=BATCH_DEFAULT_PASSWORD_LENGTH):
     self.save()
     users_list, user_password = prefix_generate_users(
         prefix, n, password_length)
     for user in users_list:
         user.full_clean()
         self.save_user(user)
     pdf_file = generate_pdf(prefix, {'users': user_password})
     pdf_file.name = pdf_file.name.split('/')[-1]
     self.pdf = pdf_file
     self.full_clean()
     self.save()