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 = 'Questionare' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label="1. What is your age?") student = models.IntegerField( choices=[ [0, 'Yes'], [1, 'No'], ], label="2. Are you currently a student?", widget=widgets.RadioSelect) studentstudy = models.StringField(label="3. If you are currently a student, please specify your field of study. If not leave blank:", blank=True) studentyear = models.IntegerField( choices=[ [1, '1st year undergraduate'], [2,'2nd year undergraduate'], [3,'3rd year undergraduate'], [4,'4th year undergraduate'], [5,'5th year undergraduate'], [6,'M.A'], [7,'Ph.D'], [8,'Does Not Apply'], ], label= "4. If you are a student, what is your year of study", widget=widgets.RadioSelect) notstudent = models.IntegerField( choices=[ [1, 'Primary School'], [2, 'High School'], [3,'Undergraduate Degree'], [4,'Graduate or Professional Degree'], [5,'Does not apply'], ], label="5. What is your highest level of education?",widget=widgets.RadioSelect) region = models.IntegerField( choices=[ [1, 'North America'], [2, 'Central/South America'], [3, 'Africa'], [4,'Asia'], [5,'Australia/New Zealand'], [6,'Europe'], [7,'Other'], ], label="6. In what region of the world did you grow up?",widget=widgets.RadioSelect) spending = models.IntegerField( choices=[ [1, '0% (none)'], [2,'Between 1% and 20% '], [3,'Between 20% and 40%'], [4,'Between 40% and 60%'], [5,'Between 60% and 80%'], [6,'Between 80% and 99%'], [7,'100% (all)'] ], label="7. What percentage of your income do you spend on leisure activities?", widget=widgets.RadioSelect) leisure = models.IntegerField( choices=[ [1, 'Not at all important'], [2, 'Not very important'], [3, 'Important'], [4, 'Very important'], [5,'Extremely important'], ], label="8. How important is leisure time to you?",widget=widgets.RadioSelect) comments = models.LongStringField(label="9. Below is a text box in which you may enter any comments you wish about the experiment.", blank=True)