from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'Judging' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): def make_field(label): return models.IntegerField( choices=[[1, "strongly disagree"], [2, "disagree"], [3, "somewhat disagree"], [4, "neutral"], [5, "somewhat agree"], [6, "agree"], [7, "strongly agree"]], label=label, widget=widgets.RadioSelectHorizontal, ) def make_field2(label): return models.IntegerField( choices=[[1, "never"], [2, "less than once a week"], [3, "once a week"], [4, "2-4 times a week"], [5, "5-7 times a week"], [6, "everyday"], [7, "more than once a day"]], label=label, widget=widgets.RadioSelectHorizontal, ) jb = make_field('I enjoyed eating the beef meat.') jc = make_field('I enjoyed eating the crocodile meat.') fb = make_field2('In the coming month, I expect to eat beef meat (of any type):') fc = make_field2('In the coming month, I expect to eat crocodile meat (of any type):')