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): # Q1 = models.IntegerField( # label= "1. 您是否修過賽局理論或是實驗經濟相關課程:", # choices=[ # [0, '是'],[1, '否'],], # widget=widgets.RadioSelect,) gender = models.IntegerField( label= "性別", choices=[ [1, '男'],[0, '女'],], widget=widgets.RadioSelect,) age = models.IntegerField(label='年齡', min=18, max=99, required = True) edu = models.IntegerField( choices=[['0', '國中以下'], ['1', '高中'],['2', '專科或技術學院'], ['3', '大學'],['4', '碩士'], ['5', '博士'] ], label='教育程度', widget=widgets.RadioSelect,) # PAGES class BasicInfo(Page): form_model = 'player' form_fields = ['gender','age','edu'] page_sequence = [BasicInfo]