from otree.api import * doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'example' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField( min = 0, max = 120 ) gender = models.IntegerField( choices=[ [0, 'Male'], [1, 'Female'], ], widget=widgets.RadioSelect ) student = models.IntegerField( choices=[ [0, 'Student'], [1, 'Not a Student'], ], widget=widgets.RadioSelect ) occupation = models.StringField() nationality = models.StringField() trust = models.IntegerField( choices=[ [0, 'Most people can be trusted'], [1, 'Can not be too careful'], [2, 'I do not know'], ], widget=widgets.RadioSelect ) # PAGES class Welcome(Page): pass class Survey(Page): form_model = 'player' form_fields = ['age', 'gender', 'student', 'occupation', 'nationality', 'trust'] class Thanks(Page): pass page_sequence = [Welcome, Survey, Thanks]