from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'completion' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): price = models.FloatField() number = models.IntegerField() decisions = models.LongStringField(label='In the box below, explain how you made your decisions today. Please answer in one or more full sentences.') yob = models.IntegerField(label='What is your year of birth?', choices=[ [2006, '2006'], [2005, '2005'], [2004, '2004'], [2003, '2003'], [2002, '2002'], [2001, '2001'], [2000, '2000'], [1999, '1999'], [1998, '1998'], [1997, '1997'], [1996, '1996'], [1995, '1995'], [1994, '1994'], [1993, '1993'], [1992, '1992'], [1991, '1991'], [1990, '1990'], [1989, '1989'], [1988, '1988'], [1987, '1987'], [1986, '1986'], [1985, '1985'], [1984, '1984'], [1983, '1983'], [1982, '1982'], [1981, '1981'], [1980, '1980'], [1979, '1979'], [1978, '1978'], [1977, '1977'], [1976, '1976'], [1975, '1975'], [1974, '1974'], [1973, '1973'], [1972, '1972'], [1971, '1971'], [1970, '1970'], [1969, '1969'], [1968, '1968'], [1967, '1967'], [1966, '1966'], [1965, '1965'], [1964, '1964'], [1963, '1963'], [1962, '1962'], [1961, '1961'], [1960, '1960'], [1959, '1959'], [1958, '1958'], [1957, '1957'], [1956, '1956'], [1955, '1955'], [1954, '1954'], [1953, '1953'], [1952, '1952'], [1951, '1951'], [1950, '1950'], [1949, '1949'], [1948, '1948'], [1947, '1947'], [1946, '1946'], [1945, '1945'], [1944, '1944'], [1943, '1943'], [1942, '1942'], [1941, '1941'], [1940, '1940'], ], ) gender = models.IntegerField(label='What is your gender identity?', choices=[ [0, 'Man'], [1, 'Woman'], [2, 'Non-Binary'], [3, 'Transgender'], [4, 'Intersex'], [5, 'Other'], ], widget=widgets.RadioSelectHorizontal ) race = models.IntegerField(label='Which race best describes you', choices=[ [1, 'Asian'], [2, 'Black or African American'], [3, 'Indigenous'], [4, 'Latino/Latina'], [5, 'White'], ], widget=widgets.RadioSelectHorizontal ) hsus = models.IntegerField(label='Did you attend high school in the United States?', choices=[ [1, 'Yes'], [0, 'No'], ], widget=widgets.RadioSelectHorizontal ) major = models.CharField(label="Which best describes your undergraduate major?", choices =[ [1, 'Architecture'], [2, 'Art'], [3, 'Biology'], [4, 'Biomedical Sciences'], [5, 'Business'], [6, 'Commerce'], [7, 'Communications'], [8, 'Computer Science'], [9, 'Criminal Justice'], [10, 'Culinary Arts'], [11, 'Economics'], [12, 'Education'], [13, 'Engineering'], [14, 'English'], [15, 'Environmental Science'], [16, 'Geography'], [17, 'History'], [18, 'Information Technology'], [19, 'Legal Studies'], [20, 'Literature'], [21, 'Music'], [22, 'Nursing'], [23, 'Pharmaceutical Sciences'], [24, 'Physics'], [25, 'Political Science'], [26, 'Psychology'], [27, 'Religious Studies'], [28, 'Social Sciences'], [29, 'Other/Not Listed'] ], ) minor = models.CharField(label="Which best describes your undergraduate minor?", choices =[ [1, 'Architecture'], [2, 'Art'], [3, 'Biology'], [4, 'Biomedical Sciences'], [5, 'Business'], [6, 'Commerce'], [7, 'Communications'], [8, 'Computer Science'], [9, 'Criminal Justice'], [10, 'Culinary Arts'], [11, 'Economics'], [12, 'Education'], [13, 'Engineering'], [14, 'English'], [15, 'Environmental Science'], [16, 'Geography'], [17, 'History'], [18, 'Information Technology'], [19, 'Legal Studies'], [20, 'Literature'], [21, 'Music'], [22, 'Nursing'], [23, 'Pharmaceutical Sciences'], [24, 'Physics'], [25, 'Political Science'], [26, 'Psychology'], [27, 'Religious Studies'], [28, 'Social Sciences'], [29, 'Other/Not Listed'] ], ) prolific_id = models.StringField(label = 'What is your Prolific ID?') # gender_adv_engineering = models.IntegerField(label='Engineering', # widget=widgets.RadioSelect, # #choices=[(-1, '1'), (-0.9, '0.9'), (-0.8, '0.8'), (-0.7, '0.7'), (-0.6, '0.6'), (-0.5, '0.5'), (-0.4, '0.4'), (-0.3, '0.3'), (-0.2, '0.2'), (-0.1, '0.1'), (0, '0'), (0.1, '0.1'), (0.2, '0.2'), (0.3, '0.3'), (0.4, '0.4'), (0.5, '0.5'), (0.6, '0.6'), (0.7, '0.7'), (0.8, '0.8'), (0.9, '0.9'), (1, '1')], # choices=[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, # 30, 40, 50, 60, 70, 80, 90, 100], # ) # # gender_adv_health = models.IntegerField(label='Health', # widget=widgets.RadioSelect, # choices=[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], # ) # # gender_adv_cs = models.IntegerField(label='Computer Science', # widget=widgets.RadioSelect, # choices=[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], # ) # # gender_adv_psych = models.IntegerField(label='Psychology / Cognitive Science', # widget=widgets.RadioSelect, # choices=[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], # ) total_payoff = models.FloatField() earned_payoff = models.FloatField() # earned_payoff = models.CurrencyField() # total_payoff = models.CurrencyField() # PAGES class MyPage(Page): pass class ResultsWaitPage(WaitPage): pass class Results(Page): pass class metoo_demographics(Page): form_model = 'player' form_fields = ['decisions', 'yob', 'gender', 'race', 'hsus', 'major', 'minor', 'prolific_id'] # # https://gitlab.com/gr0ssmann/otree_slider class slider_1(Page): form_model = 'player' form_fields = ['biology'] class metoo_end(Page): pass page_sequence = [metoo_demographics]