# drEffects, survey from __future__ import division import otree.models from otree.db import models from otree import widgets from otree.common import Currency as c, currency_range, safe_json from otree.constants import BaseConstants from otree.models import BaseSubsession, BaseGroup, BasePlayer from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random from django import forms from decimal import Decimal author = '' doc = """ """ 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): # Demographics gender = models.PositiveIntegerField( choices=[(1, 'Female'), (0, 'Male'), (2, 'Other'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label='Which gender do you identify with?' ) # Treatments frame_treat = models.StringField() task_order = models.PositiveIntegerField() math_task_B = models.PositiveIntegerField() math_task_C = models.PositiveIntegerField() # Gender questions 1 masculinity = models.PositiveIntegerField( choices=[(1, '0 = Do not identify at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Identify strongly')], widget=widgets.RadioSelectHorizontal(), label="How strongly do you identify with MASCULINITY?" ) femininity = models.PositiveIntegerField( choices=[(1, '0 = Do not identify at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Identify strongly')], widget=widgets.RadioSelectHorizontal(), label="How strongly do you identify with FEMININITY?" ) modern_sexism_1 = models.PositiveIntegerField( choices=[(5, 'A great deal'), (4, 'A lot'), (3, 'A moderate amount'), (2, 'A little'), (1, 'None at all'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label="Please tell us how much you agree with the following statement: 'when women demand equality these days, they are actually seeking special favours.'" ) modern_sexism_2 = models.PositiveIntegerField( choices=[(1, 'A great deal'), (2, 'A lot'), (3, 'A moderate amount'), (4, 'A little'), (5, 'None at all'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label="Please tell us how much you agree with the following statement: 'women often miss out on good jobs because of discrimination.'" ) modern_sexism_3 = models.PositiveIntegerField( choices=[(5, 'A great deal'), (4, 'A lot'), (3, 'A moderate amount'), (2, 'A little'), (1, 'None at all'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label="Please tell us how much you agree with the following statement: 'women who complain about harassment cause more problems than they solve.'" ) # Gender questions 2 label_gender = models.CharField() collective_1 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) collective_2 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) collective_3 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) collective_4 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) collective_5 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) collective_6 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect() ) # Marginalisation marginal_1 = models.PositiveIntegerField( choices=[(1, '0 = Not at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very much')], widget=widgets.RadioSelectHorizontal(), label="How male-dominated does your place of study or workplace feel to you?" ) marginal_2 = models.PositiveIntegerField( choices=[(1, '0 = Not at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very much')], widget=widgets.RadioSelectHorizontal(), label="How much do you feel that you are treated unfairly because of your gender?" ) marginal_3 = models.PositiveIntegerField( choices=[(1, '0 = Not at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very much')], widget=widgets.RadioSelectHorizontal(), label="How much do you feel you are treated badly because of your gender?" ) # Information check guess = models.PositiveIntegerField( min = 0, max = 100, label = "What's your best guess of the percentage of women in national parliaments around the world as of 2018?" ) # Mediators self_efficacy_1 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I can always manage to solve difficult problems if I try hard enough." ) self_efficacy_2 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "If someone opposes me, I can find the means and ways to get what I want." ) self_efficacy_3 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "It is easy for me to stick to my aims and accomplish my goals." ) self_efficacy_4 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I am confident that I could deal efficiently with unexpected events." ) self_efficacy_5 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "Thanks to my resourcefulness, I know how to handle unforeseen situations." ) self_efficacy_6 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I can remain calm when facing difficulties because I can rely on my coping abilities." ) self_efficacy_7 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "When I am confronted with a problem, I can usually find several solutions." ) # Mechanism inspired_person = models.CharField(label = "Can you name one person who has inspired you recently?") inspired_politician1 = models.CharField(label = "Can you name one politician who has inspired you recently?") inspired_politician2 = models.CharField(label = "Can you name another politician who has inspired you recently?") women_concern = models.PositiveIntegerField( choices=[(1, 'Achievement'), (2, 'Neither achievement nor reason for concern'), (3, 'Reason for concern'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "As of 2018, 24% of members of national parliaments around the world are women. Is this percentage of women an achievement or reason for concern?" ) women_expected = models.PositiveIntegerField( choices=[(1, 'Much higher'), (2, 'Moderately higher'), (3, 'Slightly higher'), (4, 'About the same'), (5, 'Slightly lower'), (6, 'Moderately lower'), (7, 'Much lower'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "Is this percentage of women in national parliaments higher or lower than you expected personally?" ) women_feeling = models.PositiveIntegerField( choices=[(1, '0 = Very cold'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very warm')], widget=widgets.RadioSelectHorizontal(), label="How warm do you feel towards women?" ) women_proud = models.PositiveIntegerField( choices=[(1, '0 = Not at all'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very proud')], widget=widgets.RadioSelectHorizontal() ) expect_discrimination = models.PositiveIntegerField( choices=[(1, '0 = Very unlikely'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very likely')], widget=widgets.RadioSelectHorizontal(), label = "How likely do you think it is that you will experience discrimination when applying for a job?" ) do_discrimination = models.CharField(label="What would YOU do if you would experience discrimination when applying for a job?") other_do_discrimination = models.PositiveIntegerField( choices=[(1, '0 = Very unlikely'), (2, '1'), (3, '2'), (4, '3'), (5, '4'), (6, '5'), (7, '6'), (8, '7'), (9, '8'), (10, '9'), (11, '10 = Very likely')], widget=widgets.RadioSelectHorizontal(), label = "How likely do you think it is that SOMETHING WOULD BE DONE to rectify the situation if you took action when you experienced discrimination when applying for a job?" ) self_esteem_1 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I feel that I am a person of worth at least on an equal plane with others." ) self_esteem_2 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I feel that I have a number of good qualities." ) self_esteem_3 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I am able to do things as well as most people." ) self_esteem_4 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I feel I do not have much to be proud of." ) self_esteem_5 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I take a positive attitude toward myself." ) self_esteem_6 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "On the whole, I am satisfied with myself." ) self_esteem_7 = models.PositiveIntegerField( choices=[(7, 'Strongly agree'), (6, 'Agree'), (5, 'Somewhat agree'), (4, 'Neither agree nor disagree'), (3, 'Somewhat disagree'), (2, 'Disagree'), (1, 'Strongly disagree'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label = "I certainly feel useless sometimes." )