diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-09-24 21:43:36 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-09-24 21:43:36 -0400 |
commit | 27c52cc8c52157d539bb3c761a53d1b6192c8b64 (patch) | |
tree | 79def6b09af2fcd84709e9f34fc7505c514c8fd6 /askbot/management | |
parent | 18770de6588c50d9a2fdcc863cdf977f257c263b (diff) | |
download | askbot-27c52cc8c52157d539bb3c761a53d1b6192c8b64.tar.gz askbot-27c52cc8c52157d539bb3c761a53d1b6192c8b64.tar.bz2 askbot-27c52cc8c52157d539bb3c761a53d1b6192c8b64.zip |
hopefully fixed a corner case bug in the login system
Diffstat (limited to 'askbot/management')
-rw-r--r-- | askbot/management/commands/askbot_add_test_content.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/askbot/management/commands/askbot_add_test_content.py b/askbot/management/commands/askbot_add_test_content.py index 888f7df0..7867fcec 100644 --- a/askbot/management/commands/askbot_add_test_content.py +++ b/askbot/management/commands/askbot_add_test_content.py @@ -72,12 +72,19 @@ class Command(NoArgsCommand): "Create the users and return an array of created users" users = [] - #add admin with the same password + #add admin with the same password - this user will be admin automatically admin = User.objects.create_user('admin', 'admin@example.com') admin.set_password('admin') + admin.save() self.print_if_verbose("Created User 'admin'") users.append(admin) + #this user will have regular privileges, because it's second + joe = User.objects.create_user('joe', 'joe@example.com') + joe.set_password('joe') + joe.save() + self.print_if_verbose("Created User 'joe'") + # Keeping the created users in array - we will iterate over them # several times, we don't want querying the model each and every time. for i in range(NUM_USERS): |