Ejemplo n.º 1
0
def _make_question_for_today(user, text):
    category = Category(name='qotd')
    question = Question(text=text, proposed_by=user, category=category, active=1)
    question.save()
    for i in range(4):
        Answer.objects.create(question=question, correct=i==1, text='a %d'%i)
    sched = Schedule(question=question)
    sched.save()
    return question
Ejemplo n.º 2
0
def _make_question_for_today(user, text):
    category = Category(name='qotd')
    question = Question(text=text, proposed_by=user, category=category, active=1)
    question.save()
    for i in range(4):
        Answer.objects.create(question=question, correct=i == 1, text='a %d' % i)
    sched = Schedule(question=question)
    sched.save()
    return question
Ejemplo n.º 3
0
def _make_question_for_today(user, text):
    category = Category(name='qotd')
    question = Question(text=text,
                        proposed_by=user,
                        category=category,
                        active=1)
    question.save()
    sched = Schedule(question=question)
    sched.save()
Ejemplo n.º 4
0
def _make_question_for_today(user, text):
    category = Category(name='qotd')
    question = Question(text=text, proposed_by=user, category=category, active=1)
    question.save()
    sched = Schedule(question=question)
    sched.save()