import importlib.util from os import environ SESSION_CONFIGS = [ dict( name='regular', display_name="Regular - random assignment to treatment", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'] ), dict( name='control_live', display_name="Control live", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='control_live' ), dict( name='control_static', display_name="Control static", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='control_static' ), dict( name='control_none', display_name="Control none", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='control_none' ), dict( name='general_static', display_name="General static", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='general_static' ), dict( name='general_live', display_name="General live", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='general_live' ), dict( name='general_none', display_name="General none", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='general_none' ), dict( name='personal_static', display_name="Personal static", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='personal_static' ), dict( name='personal_live', display_name="Personal live", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='personal_live' ), dict( name='personal_none', display_name="Personal none", num_demo_participants=1, app_sequence=['intro_app', 'otreeutils_example2', 'svotree', 'donation_high', 'donation_medium', 'donation_control', 'donation_low', 'conclusion'], treatment='personal_none' ) ] # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS, except those that explicitly override it. # the session config can be accessed from methods in your apps as self.session.config, # e.g. self.session.config['participation_fee'] SESSION_CONFIG_DEFAULTS = dict( real_world_currency_per_point=1.00, participation_fee=2.00, doc="", mturk_hit_settings=dict( keywords='bonus, study', title='Decision-Making Study', description='This is a multiple-choice survey that will take 15-30 minutes, with a possible bonus', frame_height=500, template='global/mturk_template.html', minutes_allotted_per_assignment=60, expiration_hours=7 * 24, qualification_requirements=[ { 'QualificationTypeId': "3D05Y5UXI28RUQCP9VM4EHF1AMI184", 'Comparator': "DoesNotExist", #prevent retakes }, { 'QualificationTypeId': "00000000000000000071", 'Comparator': "EqualTo", 'LocaleValues': [{'Country': "US"}] }, ], grant_qualification_id='3D05Y5UXI28RUQCP9VM4EHF1AMI184', # to prevent retakes ), ) # ISO-639 code # for example: de, fr, ja, ko, zh-hans LANGUAGE_CODE = 'en' # e.g. EUR, GBP, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'USD' USE_POINTS = False ROOMS = [ dict( name='econ101', display_name='Econ 101 class', participant_label_file='_rooms/econ101.txt', ), dict(name='live_demo', display_name='Room for live demo (no participant labels)'), ] ADMIN_USERNAME = 'admin' # for security, best to set admin password in an environment variable ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD') DEMO_PAGE_INTRO_HTML = """ Here are some oTree games. """ SECRET_KEY = '*h1w9_(@e9y2t6k-dieouccm^i+xf3x78h^x5#kv3hc8^@@qp3' INSTALLED_APPS = ['otree', 'otreeutils'] # custom URL and WebSockets configuration # this is important -- otherwise otreeutils' admin extensions won't be activated if importlib.util.find_spec('pandas'): ROOT_URLCONF = 'otreeutils_example3_market.urls'