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 = 'my_simple_survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): #name = models.StringField() age = models.IntegerField( blank=True ) gender = models.StringField( blank=True, choices=['Male', 'Female','Other'], widget=widgets.RadioSelect ) edu = models.StringField( blank=True, choices=['No schooling completed', 'Nursery school to 8th grade','9th-12th grade, no diploma','High school graduate-high school diploma or the equivalent (for example: GED)', 'Some collage credit, no degree', 'Associate degree (for example: AA, AS)', 'Bachelor\'s degree (for example: BA, AB, BS)', 'Master\'s degree (for example: MA, MS, MEng, Med, MSW, MBA)', 'Professional degree (for example: MD, DDS, DVM, LLB, JD)', 'Doctorate degree (for example: Phd, EdD)'], widget=widgets.RadioSelect ) job = models.StringField( blank=True, choices=['Employed for wages', 'Self-employed','Out of work and looking for work','Out of work but not currently looking for worker','A homemaker','A student','Retired','Unable to work'], widget=widgets.RadioSelect ) income = models.StringField( blank=True, choices=['Less than $20,000', '$20,000 to $40,000','$40,000 to $60,000','$60,000 to $80,000','$80,000 to $100,000','$100,000 or more'], widget=widgets.RadioSelect ) exp = models.IntegerField( blank=True ) ethnic = models.StringField( blank=True, choices=['White', 'Mixed/Multiple ethnic groups','Asian', 'Black/African','Other ethnic group'], widget=widgets.RadioSelect ) meet = models.LongStringField( blank=True, widget=widgets.TextInput ) stress = models.StringField( choices=['No stress', 'Mild stress','Moderate stress', 'Much stress','Extreme stress'], widget=widgets.RadioSelectHorizontal ) other = models.LongStringField( blank=True, widget=widgets.TextInput ) change = models.StringField( choices=['Strongly agree', 'Agree', 'Neutral', 'Disagree', 'Strongly disagree'], widget=widgets.RadioSelectHorizontal ) fair = models.StringField( choices=['Strongly agree', 'Agree','Neutral', 'Disagree','Strongly disagree'], widget=widgets.RadioSelectHorizontal ) rule = models.StringField( choices=['I allocated the capacity equally to both retailers. If this amount exceeds one retailer’s order, then the difference is allocated to the other retailer. Of course, the other retailer will not be allocated more than his order either. ', 'I allocated the capacity proportionally to the retailer’s orders. If retailer A ordered proportionally more than retailer B, I allocated products proportionally more to retailer A than retailer B.', ' The difference between the total orders and capacity is divided by the number of retailers (two), and this amount is subtracted from each order.', 'Other'], widget=widgets.RadioSelect ) mean = models.StringField( choices=['Retailer A', 'Retailer B','Same', 'I\'m not sure'], widget=widgets.RadioSelectHorizontal ) difference = models.StringField( choices=['Not at all', 'a little','Moderately', 'Mostly', 'Fully'], widget=widgets.RadioSelectHorizontal )