from otree.api import* doc = """ Part 0: the initial survey """ class C(BaseConstants): NAME_IN_URL = 'Demographic_survey' PLAYERS_PER_GROUP = 10 NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='1. What is your age?', min=13, max=120) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female']], label='2. What is your gender?', widget=widgets.RadioSelect, ) school = models.StringField( label='3. Please type in your field of study.', ) degree = models.StringField( choices=['Undergraduate', 'Master', 'Doctoral', 'Post-Doctoral'], label='4. Please select your education level.', widget=widgets.RadioSelect, ) """ other = models.LongStringField( label='If you select other, please type in your major here ' ) choices=['Computer Science', 'Economics and Management', 'Engineering', 'Humanities', 'Law', 'Life Sciences', 'Mathematics', ' Natural Science', 'Psychology' 'Social Sciences and Education', 'Teaching and Education', 'Other'], """ # PAGES class IntroPage1(Page): form_model = 'player' class IntroPage2(Page): form_model = 'player' form_fields = ['age', 'gender', 'school', 'degree'] class IntroPratice1(Page): form_model = 'player' class IntroPratice2(Page): form_model = 'player' page_sequence = [IntroPage1, IntroPage2, IntroPratice1, IntroPratice2]