author | nishanth |
Wed, 30 Jun 2010 10:45:27 +0530 | |
changeset 74 | 46c5ae6594df |
parent 53 | 8cc852e205aa |
permissions | -rw-r--r-- |
from django.core.management.base import NoArgsCommand from offline.quiz.models import Quiz def seed_db(): """ set ip of all the previous quizzes to null. """ for q in Quiz.objects.all(): q.user_ip = "" q.save() class Command(NoArgsCommand): def handle_noargs(self, **options): """ Just copied the code from seed_db.py """ seed_db()