from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) class Constants(BaseConstants): name_in_url = 'survey' 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?', min=13, max=125) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female'],['Not Specified', 'Not Specified']], label='What is your gender?', widget=widgets.RadioSelect, ) feet = models.IntegerField( label='''feet''', min=4, max=7) inches = models.IntegerField( label='inches', min=0, max=12) rt = models.IntegerField( label=''' How many round trip flights do you take in a year? ''' ) bizlei = models.IntegerField( label=''' What percentage of your flights are taken for business purposes (0-100)? ''', min=0, max=100 ) seattype = models.StringField( choices=[['Window', 'Window'], ['Middle', 'Middle'],['Aisle', 'Aisle']], label='In general, what seat type do you prefer?', widget=widgets.RadioSelect, ) section = models.StringField( choices=[['Economy', 'Economy'], ['Premier', 'Premier'],['First', 'First']], label='Which class of seat do you usually purchase?', widget=widgets.RadioSelect, ) comment = models.LongStringField( label='Do you have any comments regarding this survey', blank = True )