from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'survey_questions' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): # Introduction agreement = models.StringField( label = 'Declaration of agreement', choices=['I agree to participate in the experiment'] ) # Demographic Questions age = models.IntegerField(min=16, max=100) gender = models.StringField( choices=['Male', 'Female', 'Other', "Prefer not to answer"], widget=widgets.RadioSelect ) education = models.StringField( choices=[ 'Below A-levels (Abitur)', 'A-levels (Abitur)', 'Bachelor', 'Master', 'PhD' ], widget=widgets.RadioSelect ) occupation=models.StringField( choices=[ 'Student', 'Employed full-time', 'Self-employed', 'Unemployed', 'Other' ], widget=widgets.RadioSelect ) wealth = models.IntegerField( choices=[ [1, "Below €5000"], [2, "Between €5000 and €20000"], [3, "Between €20000 and €60000"], [4, "Between €60000 and €120000"], [5, "More than €120000"], [0, "Prefer not to answer"] ], widget=widgets.RadioSelect ) # Assessment Questions risk_gen = models.IntegerField( choices=[ [1, "Not at all willing to take risks"], [2, ""], [3, ""], [4, ""], [5, "Very willing to take risks"] ], widget=widgets.RadioSelect ) risk_fin = models.IntegerField( choices=[ [1, "I avoid risk at all costs"], [2, ""], [3, "I try to balance risk and returns"], [4, ""], [5, "I want the highest possible returns even if it entails a high level of risk"] ], widget=widgets.RadioSelect ) knowledge = models.IntegerField( choices=[ [1, "Strongly disagree"], [2, ""], [3, ""], [4, ""], [5, ""], [6, ""], [7, "Strongly agree"] ], widget=widgets.RadioSelect ) return_exp = models.IntegerField( choices=[ [1, "Lower returns"], [2, ""], [3, "Similar returns"], [4, ""], [5, "Higher returns"] ], widget=widgets.RadioSelect ) risk_exp = models.IntegerField( choices=[ [1, "Less risky"], [2, ""], [3, "Equally risky"], [4, ""], [5, "More risky"] ], widget=widgets.RadioSelect ) sus_inv = models.IntegerField( choices=[ [1, "Not willing at all"], [2, ""], [3, ""], [4, ""], [5, "Very willing"] ], widget=widgets.RadioSelect ) """ sus_gen = models.IntegerField( choices=[ [1, "I pay no attention at all to sustainability while shopping"], [2, ""], [3, ""], [4, ""], [5, "Sustainability has a large impact on what I buy"] ], widget=widgets.RadioSelect ) """ giving = models.IntegerField( choices=[ [1, "Not willing at all"], [2, ""], [3, ""], [4, ""], [5, "Very willing"] ], widget=widgets.RadioSelect ) """ helping = models.IntegerField( choices=[ [1, "Always help yourself first"], [2, ""], [3, ""], [4, ""], [5, "Always help others first"] ], widget=widgets.RadioSelect ) contributing = models.IntegerField( choices=[ [1, "Not important at all"], [2, ""], [3, ""], [4, ""], [5, "Very important"] ], widget=widgets.RadioSelect ) """ # PAGES class Introduction(Page): form_model = 'player' form_fields = ['agreement'] class DemoQuestions(Page): form_model = 'player' form_fields = ['age', 'gender', 'education', 'occupation', 'wealth'] class AssQuestions(Page): form_model = 'player' form_fields = ['risk_gen', 'risk_fin', 'knowledge', 'return_exp', 'risk_exp', 'sus_inv', 'giving'] class AltQuestions(Page): form_model = 'player' form_fields = ['sus_inv', 'sus_gen', 'giving', 'helping', 'contributing'] page_sequence = [Introduction, DemoQuestions, AssQuestions]