from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) from django import forms from otree import widgets from django import template from django_countries import Countries from django.contrib.auth import get_user_model from django.contrib.auth.models import AbstractBaseUser author = 'Sarah' doc = """ these questions are based on GLOBAL EVIDENCE ON ECONOMIC PREFERENCES by FALK, BECKER, DOHMEN, ENKE, HUFFMAN, SUNDE, 2018 QJE Patience: Intertemporal choice sequence using staircase method Self-assessment: willingness to wait Risk taking Lottery choice sequence using staircase method Self-assessment: willingness to take risks in general Positive Gift in exchange for help reciprocity Self-assessment: willingness to return a favor Negative Self-assessment: willingness to take revenge reciprocity Self-assessment: willingness to punish unfair behavior toward self Self-assessment: willingness to punish unfair behavior toward others Altruism Donation decision Self-assessment: willingness to give to good causes Trust Self-assessment: people have only the best intentions """ class Constants(BaseConstants): name_in_url = 'GPS' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): risk_WP13417 = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) future_WP13418R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) Punish_WP13419R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) punish_WP13420R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) good_cause_WP13421R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) favor_WP13422R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) revange_WP13423R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) intention_WP13424R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) math_WP13425R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) postpone_WP13426R = models.IntegerField(widget=widgets.RadioSelectHorizontal, choices=[[0, '0'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']]) present_WP13458R = models.IntegerField(widget=widgets.RadioSelect, choices=[[1, 'No, would not give present'], [2, 'The present worth 10 U.S. dollars'], [3, 'The present worth 20 U.S. dollars'], [4, 'The present worth 30 U.S. dollars'], [5, 'The present worth 40 U.S. dollars'], [6, 'The present worth 50 U.S. dollars'], [7, 'The present worth 60 U.S. dollars'], ]) donate_WP13459R = models.IntegerField(widget=widgets.Slider(attrs={'step': '10'}), min=0, max=1600)