from otree.api import * doc = """ Final survey """ class C(BaseConstants): NAME_IN_URL = 'demographics' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', min=13, max=125) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female'], ['Not listed', 'Not listed'], ['Prefer not to say', 'Prefer not to say']], label='To which gender identity do you most identify?', widget=widgets.RadioSelect, ) school_belonging = models.StringField( choices=[['TiSEM', 'School of Economics and Management (TiSEM)'], ['TLS', 'Law School (TLS)'], ['TSHD', 'School of Humanities and Digital Sciences (TSHD)'], ['TSB', 'School of Social and Behavioral Sciences (TSB)']], label="Which school are you enrolled in?", widget=widgets.RadioSelect, ) program_belonging = models.StringField( label='Which program are you currently enrolled in?' ) year_course = models.StringField( label='How long have you been enrolled in this program?' ) iban_1 = models.StringField( label="Write down your IBAN code." ) iban_2 = models.StringField( label="Write down your IBAN code again, so we are sure it is correct." ) class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'school_belonging', 'program_belonging', 'year_course', 'iban_1', 'iban_2'] class LeaveRoom(Page): pass page_sequence = [Demographics, LeaveRoom]