コード例 #1
0
ファイル: tests.py プロジェクト: TomyRO/wouso
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
コード例 #2
0
ファイル: tests.py プロジェクト: MathPlayer/wouso
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
コード例 #3
0
ファイル: tests.py プロジェクト: vladfulgeanu/wouso
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()
コード例 #4
0
ファイル: tests.py プロジェクト: LucianU/wouso
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()