from otree.api import * class C(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='How old are you? (Quel âge avez-vous ?)', min=18, max=80) gender = models.StringField( choices=[['Male', 'Male (homme)'], ['Female', 'Female (femme)'], ['Other', 'Other (autre)']], label='What is your gender? (Quel est votre genre ?)', widget=widgets.RadioSelect, ) education = models.StringField( choices=[['Highschool' , 'Highschool (secondaire)'],['Technical Degree','Technical Degree (diplôme technique)'], ['Bachelor','Bachelor (licence/bachelier)'], ['Master', 'Master'], ['PhD','PhD (doctorat)']], label='What is the highest educational degree you have obtained? (Quel est le diplôme le plus élevé que vous ayez obtenu ?)', widget=widgets.RadioSelect, ) birthcontinent = models.StringField( label='What continent did you grow up in? (Dans quel continent avez-vous grandi ?)', choices=[["Africa", "Africa (Afrique)"], ["Asia", "Asia (Asie)"], ["Europe", "Europe"], ["North America", "North America (Amérique du Nord)"], ["Oceania", "Oceania (Océanie)"], ["South America", "South America (Amérique du Sud)"]], widget=widgets.RadioSelect, ) urban = models.StringField( label="Did you grow up in a urban or a rural area? (Avez-vous grandi dans une zone urbaine ou rurale ?)", choices=[["urban","urban (urbaine)"], ["rural", "rural (rurale)"]], widget=widgets.RadioSelect, ) siblings = models.IntegerField(label='How many siblings do you have? (Combien de frères et sœurs avez-vous ?)', min=0, max=20) ethnicity=models.StringField( label='Do you identify with one of the following ethnicities? (Vous identifiez-vous à l\'une des ethnies suivantes ?)', choices=[['Latinx','Latinx'],['Asian','Asian (asiatique)'],['White','White (blanc)'],['Black','Black (noir)'],['Other','Other (autre)'],['None','None (aucune)']], widget=widgets.RadioSelect, ) unit = models.StringField( label='', choices=[['months','months (mois)'],['years','years (ans)']], widget=widgets.RadioSelect, ) together = models.IntegerField(label='', min=0, max=100) meet = models.StringField( label='', choices=[['School','School (école)'],['Through Friends','Common Friends (amis communs)'],['Blind Date','Blind Date (date aveugle)'],['Social Media','Social Media (réseaux sociaux)'],['Dating apps','Dating apps (applications de rencontre)'],['Other','Other (autres)']], widget=widgets.RadioSelect, ) similarity_scale = models.StringField( label='', choices=[['Very similar','Very similar (Très similaires)'],['Somewhat similar','Somewhat similar (Un peu similaires)'], ['Somewhat different','Somewhat different (Un peu différents)'], ['Very different','Very different (Très différents)']], widged=widgets.RadioSelect, ) politics = models.StringField( label='Politics (Politique)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) religion = models.StringField( label='Religion', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) fashion = models.StringField( label='Fashion choices (Mode)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) food = models.StringField( label='Food preferences (Préférences alimentaires)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) music = models.StringField( label='Musical taste (Goûts musicaux)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) finances = models.StringField( label='Personal finances (Finances personnelles)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) values = models.StringField( label='Core values (Valeurs)', choices=[['Usually agree', 'Usually agree (Plutôt d\'accord)'], ['Usually disagree', 'Usually disagree (Plutôt pas d\'accord)']], widged=widgets.RadioSelect, ) income_equality = models.StringField( label='Would you say that your income, compared to that of your partner, is (Diriez-vous que vos revenus, comparés à ceux de votre partenaire, sont):', choices=[['Less than', 'Less than (inférieur à)'], ['Equal to', 'Equal to (égal à)'], ['More than', 'More than (supérieur à)'], ['I do not know','I do not know (Je ne sais pas)']], widget=widgets.RadioSelect, ) income_rank = models.StringField( label='Your monthly income falls into which category (Dans quelle catégorie se situe votre revenu mensuel ?):', choices=[['Less than 1500 EUR', '< 1500 EUR'], ['1500 to 2500 EUR', '1500 - 2500 EUR'], ['2600 to 4000 EUR', '2600 - 4000 EUR'], ['4100 to 6000 EUR', '4100 - 6000 EUR'], ['more than 6000 EUR', '> 6000 EUR']], widget=widgets.RadioSelect, ) # FUNCTIONS # PAGES class Demographics(Page): form_model = 'player' form_fields = [ 'age', 'gender','education','birthcontinent', 'urban' ,'siblings','ethnicity', 'income_equality', 'income_rank'] class Couple(Page): form_model = 'player' form_fields = ['together', 'unit'] class Couple1(Page): form_model = 'player' form_fields = ['meet'] class Couple2(Page): form_model = 'player' form_fields = ['similarity_scale'] class Couple3(Page): form_model = 'player' form_fields = ['politics','religion','fashion','music','food','finances','values'] class Thanks(Page): pass page_sequence = [Couple, Couple1, Couple2, Couple3, Demographics, Thanks]