from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'my_survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): email = models.StringField(label='What is your e-mail address?') age = models.IntegerField(label='What is your age?', min=18) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female'], ['Transgender Masculine', 'Transgender Masculine'], ['Transgerd Feminine', 'Transgerd Feminine'], ['Gender Variant / Non Conforming', 'Gender Variant / Non Conforming'], ['Other not listed', 'Other not listed'], ['Prefer not to answer', 'Prefer not to answer']], label='How do you define your gender?') ethnicity = models.StringField(choices=[['White', 'White'], ['Black', 'Black'], ['Asian', 'Asian'], ['Persian', 'Persian'], ['Mixed', 'Mixed'], ['Other', 'Other'], ['Prefer not to answer', 'Prefer not to answer']], label='What ethnicity do you identify as?') income = models.StringField(choices=[["£0 to £12'000", "£0 to £12'000"], ["£12'001 to £25'000", "£12'001 to £25'000"], ["£25'001 to £40'000", "£25'001 to £40'000"], ["£40'001 to £80'000", "£40'001 to £80'000"], ["£80'001 to £100'000", "£80'001 to £100'000"], ["Over £100'001", "Over £100'001"]], label='What is your annual income?') employment = models.StringField(choices=[['Unemployed', 'Unemployed'], ['Student', 'Student'], ['Working (full-time)', 'Working (full-time)'], ['Working (part-time)', 'Working (part-time)']], label='What is your current employment status?') marriage = models.StringField(choices=[['Single', 'Single'], ['Married', 'Married'], ['Living with a partner', 'Living with a partner'], ['Non committed relationship', 'Non committed relationship'], ['Other', 'Other'], ['Prefer not to answer', 'Prefer not to answer']], label='What is your relationship status?') children = models.BooleanField(choices=[[True, 'Yes'], [False, 'No']], label='Are you a parent?') location = models.StringField(label='Where are you currently based? (city)') politics = models.StringField(choices=[['Socialist', 'Socialist'], ['Liberal', 'Liberal'], ['Conservative', 'Conservative']], initial='How do you define your politics?') ubi = models.BooleanField(choices=[[True, 'Yes'], [False, 'No']], label='Do you think Universal Basic Income can reduce the wealth gap?') education = models.StringField(choices=[['GCSEs or equivalent ', 'GCSEs or equivalent '], ['A-Levels or equivalent', 'A-Levels or equivalent'], ['Bachelors Degree', 'Bachelors Degree'], ['Masters Degree', 'Masters Degree'], ['PhD (completed or pursuing)', 'PhD (completed or pursuing)'], ['None of the above', 'None of the above']], initial='What is your last educational qualification?') class Survey(Page): form_model = 'player' form_fields = ['email', 'age', 'gender', 'ethnicity', 'income', 'employment', 'marriage', 'children', 'location', 'politics', 'education', 'ubi'] class Results(Page): form_model = 'player' page_sequence = [Survey, Results]