from otree.api import * def make_likert(label): return models.IntegerField( label=label, choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelect ) class C(BaseConstants): NAME_IN_URL = 'final_survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): who_am_i_1 = models.LongStringField( label="Please write a short statement (1-10 words) answering: 'Who am I?'" ) who_am_i_2 = models.LongStringField( label="Please write a second short statement (1-10 words) answering: 'Who am I?'" ) age = models.IntegerField(min=13, max=90, label='How old are you?') gender = models.StringField( choices=[ 'Male', 'Female', 'Non-binary', ], widget=widgets.RadioSelect, label='What is your gender?' ) ethnicity = models.StringField( choices=[ 'White', 'East Asian', 'Southeast Asian', 'South Asian', 'Black or African American', 'Hispanic/Latino', 'Native American or Alaska Native', 'Middle Eastern or North African', 'Pacific Islander', 'Other', ], widget=widgets.RadioSelect, label='Your Race or Ethnicity:' ) ethnicity_other = models.StringField( blank=True, label='Please specify:' ) father_birth_country = models.StringField(label='In what country was your father born?') mother_birth_country = models.StringField(label='In what country was your mother born?') birth_country = models.StringField( label='In what country were you born?' ) us_start_age = models.IntegerField( blank=True, min=0, max=120, label='If not the U.S., at what age did you start living in the U.S.?' ) stereotype_asian_trustworthy = make_likert('East Asian Americans are trustworthy') stereotype_asian_cooperative = make_likert('East Asian Americans are cooperative') stereotype_asian_sneaky = make_likert('East Asian Americans are sneaky') stereotype_asian_competitive = make_likert('East Asian Americans are competitive') stereotype_white_trustworthy = make_likert('White Americans are trustworthy') stereotype_white_cooperative = make_likert('White Americans are cooperative') stereotype_white_sneaky = make_likert('White Americans are sneaky') stereotype_white_competitive = make_likert('White Americans are competitive') attention_check = make_likert("Select Extremely Common") gender_stereotype_generous = make_likert('Generous') gender_stereotype_lazy = make_likert('Lazy') gender_stereotype_frugal = make_likert('Frugal') gender_stereotype_impatient = make_likert('Impatient') gender_stereotype_studious = make_likert('Studious') gender_stereotype_reckless = make_likert('Reckless') considered_identity = models.StringField( choices=['Yes', 'No'], widget=widgets.RadioSelect, label='Did you consider the identity of the other player when making your decision?' ) considered_identity_details = models.LongStringField( blank=True, label="If you answered 'Yes' above, what aspects of the other player's identity did you consider?" ) suspicion_level = models.StringField( choices=['No suspicion', 'Mild suspicion', 'High suspicion'], widget=widgets.RadioSelect, label='Were there any parts of the study that felt like a test or that you felt you were being guided toward a certain answer?' )