from otree.api import * def get_quiz_data(): return [ dict( name='a', solution=True, explanation="3 is prime. It has no factorization other than 1 and itself.", ), dict( name='b', solution=False, explanation="2 + 2 is 4.", ), ] def get_quiz_questions(): a = models.BooleanField(label="Is 3 a prime number?") b = models.IntegerField(label="What is 2 + 2?") return [a, b]