Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 21st, 2012  |  syntax: Python  |  size: 0.33 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from gamecode.models import Fixture
  2. from gamecode.models import Prediction
  3. from gamecode.models import PredictionOption
  4.  
  5. fixs = Fixture.objects.all().order_by('kickoff_time', 'pk')
  6. count = 1
  7. for f in fixs:
  8.     Prediction.objects.create(code=count, description='Result', prediction_kind='result', fixture=f)
  9.     count = count + 1