
Untitled
By: a guest on
Aug 21st, 2012 | syntax:
Python | size: 0.33 KB | hits: 22 | expires: Never
from gamecode.models import Fixture
from gamecode.models import Prediction
from gamecode.models import PredictionOption
fixs = Fixture.objects.all().order_by('kickoff_time', 'pk')
count = 1
for f in fixs:
Prediction.objects.create(code=count, description='Result', prediction_kind='result', fixture=f)
count = count + 1