Example #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
Example #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
Example #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()
Example #4
0
def qotd_schedule(request):
    Schedule.automatic()
    return redirect('qpool_home', cat='qotd')
Example #5
0
def qotd_schedule(request):
    Schedule.automatic()
    return HttpResponseRedirect(reverse('wouso.interface.cpanel.views.qpool_home'))
Example #6
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()
Example #7
0
def qotd_schedule(request):
    Schedule.automatic()
    return HttpResponseRedirect(
        reverse('wouso.interface.cpanel.views.qpool_home'))