Skip to content

Instantly share code, notes, and snippets.

@badescunicu
Created October 5, 2013 11:17
Show Gist options
  • Save badescunicu/6839630 to your computer and use it in GitHub Desktop.
Save badescunicu/6839630 to your computer and use it in GitHub Desktop.
create_players
# 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