from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) from django import forms class Constants(BaseConstants): name_in_url = 'survey' players_per_group = 5 num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): device = models.IntegerField( choices=[ [1, 'スマホ'],[2, 'ノートPC'],[3, 'タブレット端末'],[4, 'デスクトップ端末'],], widget=widgets.RadioSelect, blank=False, label="", ) gender = models.IntegerField( choices=[[0,'男性'],[1, '女性'], [2, 'その他']], label='', widget=widgets.RadioSelectHorizontal, ) age = models.IntegerField( blank=True, label='', ) work = models.IntegerField( choices=[[0,'大学生'],[1,'大学院生'], [2,'社会人'], [3,'その他']], label='', widget=widgets.RadioSelectHorizontal, ) risk = models.IntegerField( label='', widget=widgets.Slider(), min=0,max=10 ) opinion = models.TextField( blank=True, label='' )