Created
October 5, 2013 11:17
-
-
Save badescunicu/6839630 to your computer and use it in GitHub Desktop.
create_players
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# după ce activezi sandboxul, rulează ./manage.py shell | |
# și scrie acolo import create_players | |
from wouso.core.user.models import User | |
for i in range(15): | |
name = 'student' + str(i) | |
user = User.objects.create(username=name) | |
user.set_password('student') | |
user.save() | |
pl = user.get_profile() | |
pl.full_name = 'Student' + str(i) | |
pl.points = i * 50 | |
pl.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment