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): eval1 = models.FloatField( label="My evaluation for this candidate's performance on short-answered math questions is:" ) eval2 = models.FloatField( label="My evaluation for this candidate's performance on games is:" ) eval3 = models.FloatField( label="My evaluation for this candidate's combined skill task is:" ) wtp1 = models.FloatField( label="My willingness to pay for this candidate for short-answered math questions is:" ) wtp2 = models.FloatField( label="My willingness to pay for this candidate for games is:" ) wtp3 = models.FloatField( label="My willingness to pay for this candidate for combined skill task 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 = ["eval1", "eval2", "eval3"] class ResultsWaitPage(WaitPage): pass class Results(Page): pass class MyPage3(Page): form_model="player" form_fields = ["wtp1", "wtp2", "wtp3"] class MyPage2(Page): pass class MyPage4(Page): form_model="player" form_fields = ["math2"] page_sequence = [Start, MyPage, MyPage2, MyPage3, MyPage4, Results]