from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'inst_racism' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): eval = models.BooleanField( choices=[[True, "Correct"], [False, "Incorrect"]], widget=widgets.RadioSelect, label="My partner was:" ) cd= models.BooleanField( choices=[[True, "Cooperate"], [False, "Defect"]], widget=widgets.RadioSelect, label="My Choice is:" ) cd = models.BooleanField( choices=[[True, "Cooperate"], [False, "Defect"]], widget=widgets.RadioSelect, label="My Choice is:" ) math1 = models.IntegerField( choices=[[1, "1125"], [2, "1120"], [3, "1110"]], widget=widgets.RadioSelect, label="Your answer is:" ) math2 = models.FloatField( label="Your answer is:", ) class Message(ExtraModel): group = models.Link(Group) sender = models.Link(Player) text = models.StringField() def to_dict(msg: Message): return dict(sender=msg.sender.id_in_group, text=msg.text) # PAGES class Start(Page): pass class MyPage(Page): form_model = "player" form_fields = ["eval"] class Inst1(Page): pass class Inst2(Page): pass class Results(Page): pass class MyPage2(Page): form_model="player" form_fields = ["cd"] class MyPage3(Page): form_model="player" form_fields = ["math1"] class MyPage4(Page): form_model="player" form_fields = ["math2"] # page_sequence = [Start, MyPage, MyPage2, MyPage3, MyPage4, Results] page_sequence = [Inst1, Inst2]