from otree.api import * doc = """ Basic Demographic Questionnaire """ class C(BaseConstants): NAME_IN_URL = 'questn' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): female = models.IntegerField( label='Gender assigned at birth', choices=[[0,'Male'],[1,'Female']], widgets=widgets.RadioSelect ) cards = models.IntegerField( label='Do you play online games where you trade stuff?', choices=[[1,'Yes'],[0,'No']], widgets=widgets.RadioSelect ) # PAGES class Questionnaire(Page): form_model = 'player' form_fields = ['female','cards'] page_sequence = [Questionnaire]