feedback/management/commands/ch_ip.py
author nishanth
Thu, 01 Jul 2010 16:55:22 +0530
changeset 85 451be7b1de20
parent 53 8cc852e205aa
permissions -rw-r--r--
created form for editing and used it in view

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()