from otree.api import * doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): cohort = models.StringField( label="2.您的年级是", choices=["2018级", "2019级", "2020级", "2021级"] ) gender = models.StringField( label="1.您的性别是", choices=["男", "女"] ) subject = models.StringField( label="3.您的专业是", choices=["经济学", "经济统计学", "数学", "信息与计算科学"] ) siblings = models.IntegerField( label="4.您同父同母的兄弟姐妹有几个 (若为独生子女,请填写0)" ) degree1 = models.StringField( label="5.您的母亲是否有大学本科或以上学历", choices=["是", "否"] ) degree2 = models.StringField( label="6.您的母亲是否有硕士研究生或以上学历", choices=["是", "否"] ) degree3 = models.StringField( label="7.您的父亲是否有大学本科或以上学历", choices=["是", "否"] ) degree4 = models.StringField( label="8.您的父亲是否有硕士研究生或以上学历", choices=["是", "否"] ) home = models.StringField( label="9.您的生源地是", choices=["广东省", "非广东省"] ) wechat = models.StringField(label="11.您的微信号是") repeat = models.StringField( label="10.您近期是否参加过本实验的其他变体实验", choices=["是", "否"] ) # PAGES class SurveyQuestions(Page): form_model = "player" form_fields = ["gender", "cohort", "subject", "siblings", "degree1", "degree2", "degree3", "degree4", "home", "repeat", "wechat"] class LastPage(Page): pass page_sequence = [SurveyQuestions, LastPage]