from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author ='Xuewei WANG' doc = """ Survey for thesis """ class Constants(BaseConstants): name_in_url = 'my_simple_survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): DrinkQ = models.BooleanField(label='Do you consume alcoholic drinks?请问您有饮酒经验吗?', choices=[ [True, 'Yes是的'], [False, 'No没有'], ], widget=widgets.RadioSelect ) # Private Information. Age = models.IntegerField(min=18, label='Whats you age? 请问您的年纪?You should more than 18 year old您需要至少18周岁') Nationality = models.StringField(label='What is your nationality? 您的国籍?') Educational = models.IntegerField( choices=[ [1, 'below Bachelor 本科以下'], [2, 'Bachelor 本科'], [3, 'Master 硕士'], [4, 'Doctor 博士'], ], label='What is your educational Level 您的受教育水平?' ) # Income information MonthIncome = models.IntegerField( choices=[ [1, '<1000 euro'], [2, '1000~2000 euro'], [3, '2000~3000 euro'], [4, '>3000 euro'], ], label='how much income you have per month?您的月均收入是多少?' ) OverseaExperience = models.BooleanField( choices=[ [True, 'Yes有'], [False, 'No没有'], ], label='Do you have oversea life experience at least one year?您是否有海外生活经验(连续超过一年)?', widget=widgets.RadioSelect, ) OnlinePurchase = models.BooleanField( choices=[ [True, 'Yes有'], [False, 'No没有'], ], label='Do you have experience of buying wine online?', widget=widgets.RadioSelect, ) # Wine DrinkYears = models.IntegerField(label='how many years have you drank alcohol?您有多少年的饮酒经验?') DrinkCost = models.IntegerField( choices=[ [1, '<10 euro'], [2, '10~20 euro'], [3, '21~30euro'], [4, '>30 euro'], ], label='how much do you spend on alcoholic drinking per week? 您每周酒类消费多少钱?' ) # Decision like_level = models.IntegerField( choices=[ [1, '非常喜欢 Really like'], [2, '很喜欢 Like'], [3, '一般 Normal'], [4, '不喜欢 Dislike'], [5, '非常不喜欢 Really dislike'], ], label='How much do you like this this wine? 您喜欢这款酒吗?' ) price_accepted = models.IntegerField( choices=[ [1, '<10euro'], [2, '10~30euro'], [3, '31~50euro'], [4, '51~70euro'], [5, '>70euro'], ], label='What is the value of this wine ? 您认为这瓶酒的价值是多少?' ) offer_accepted = models.IntegerField( choices=[ [1, '<10euro'], [2, '10~30euro'], [3, '31~50euro'], [4, '51~70euro'], [5, '>70euro'], ], label='How much will you pay for this bottle? 您愿意为这瓶酒支付多少钱?' ) # Feedback Feedback1 = models.IntegerField( choices=[ [1, 'Product Summary 产品概要'], [2, 'Brand Story 品牌故事'], [3, 'Detail 产品细节'], [4, 'Packing and logistics 包装及物流'], [5, 'Wine Serving 侍酒及饮用'], [6, 'Comment 用户评价及反馈'], [7, 'Tasting Note 评酒笔记'], ], label='which part is the most necessary for you to understand this product? 您觉得哪个部分最重要帮助您理解产品?' ) Feedback2 = models.StringField(label='What did you remember most about the products? 对这款产品您印象最深的点?')