Skip to content

Instantly share code, notes, and snippets.

@gnrfan
Forked from PuercoPop/Populate circuits
Created June 5, 2012 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnrfan/2878907 to your computer and use it in GitHub Desktop.
Save gnrfan/2878907 to your computer and use it in GitHub Desktop.
small snippet to replicate circuits in development database
import random
from circuits.models import Circuit
from user_profile.models import UserProfile
circuits = Circuit.objects.all()
profiles = UserProfile.objects.all()
countdown = 100
while countdown > 0:
circuit = random.choice( circuits )
profile = random.choice( users )
circuit.remix(profile.user)
countdown -= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment