diff --git a/ctftool b/ctftool index d512618..224abab 100755 --- a/ctftool +++ b/ctftool @@ -42,10 +42,20 @@ def gen_team(args): diff = timedelta(minutes=5) for i in range(n): name = "Team {}".format(i + 1) - t = Team.create(name=name, email="none@none.com", affiliation="Autogenerated", eligible=True, key="", email_confirmation_key="autogen", email_confirmed=True) + t = Team.create(name=name, affiliation="Autogenerated", key="") t.key = "autogen{}".format(t.id) + username = "username{}".format(i+1) + password = "password{}".format(i+1) + user = User.create(username=username, email="nope@nope.nope", + background="university", country="ISL", + tshirt_size="XL", gender="M", + email_confirmation_key="autogen", email_confirmed=True, + team=team) t.save() + user.setPassword("password{}".format(user.id)) + user.save() print("Team added with id {}".format(t.id)) + print("User added with username {} and password {}".format(username, password)) def add_admin(args): username = input("Username: ")