added random activation of some campaigns

pull/1/head
Andromeda Yelton 2011-10-21 14:45:43 -04:00
parent e41e1e7b6d
commit ce0d20a028
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,11 @@ class Command(BaseCommand):
campaign.deadline = random_date(now + timedelta(days=5),
now + timedelta(days=180))
# randomly activate some of the campaigns
coinflip = D(randint(0,10))
if coinflip > 5:
campaign.activated = now
campaign.save()
print "created %s" % campaign