from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'ESD' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', max=150, min=18) gender = models.StringField(choices=[['0', 'female'], ['1', 'male'], ['2', 'other']], label='What is your gender?', widget=widgets.RadioSelect) occupation = models.IntegerField(choices=[[1, 'Student'], [2, 'Unemployed'], [3, 'Worker'], [4, 'Self-employed'], [5, 'Civil Servant']], label='What is your occupation?') income = models.IntegerField(choices=[[1, '<450€'], [2, '450€ - 1000€'], [3, '1001€ - 3000€'], [4, '3001€ - 5000€'], [5, '5001€ - 10000€'], [6, '>10000€'], [7, "Don't know"]], label='What is your monthly income?') investment = models.IntegerField(choices=[[1, '0 €'], [2, '<50 €'], [3, '50 € - 100 €'], [4, '101 € - 500 €'], [5, '501 € - 1000 €'], [6, '1001 € - 5000 €'], [7, '>5000 €']]) preferences_1 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '900€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_2 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1000€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_3 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1100€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_4 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1200€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_5 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1300€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_6 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1400€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) preferences_7 = models.BooleanField(choices=[[True, '1100€ returns in one year'], [False, '1500€ returns in two years']], label='Invest 1000€ today and get...', widget=widgets.RadioSelectHorizontal) ethics_1 = models.BooleanField(choices=[[True, 'Yes, ethics are important for my investment decision'], [False, 'No, I always want to maximise my profits.']], widget=widgets.RadioSelect) ethics_2 = models.IntegerField(choices=[[1, 'Nothing (0€)'], [2, 'Fast-food dinner (10€)'], [3, 'Night-out with friends (50€)'], [4, 'New pair of shoes (100€)'], [5, 'Holiday Trip (500€)'], [6, 'Macbook (1000€)']], label='What are you willing to give up?', widget=widgets.RadioSelect) consumption_1 = models.IntegerField(choices=[[1, '<5 €'], [2, '5 € - 8 €'], [3, '8 € - 11 €'], [4, '11 € - 14 €'], [5, '>14 €']], label='Willingness to pay for one kg', widget=widgets.RadioSelect) consumption_2 = models.IntegerField(choices=[[1, '0 % - 30 %'], [2, '30 % - 60 %'], [3, '60 % - 90 %'], [4, '90 % - 120 %'], [5, '120 % - 150 %'], [6, '>150 %']], label='Price increase', widget=widgets.RadioSelect) def my_method(self): pass