-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
77 lines (62 loc) · 2.31 KB
/
settings.py
File metadata and controls
77 lines (62 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import os
from os import environ
import dj_database_url
from boto.mturk import qualification
import otree.settings
ADMIN_USERNAME = 'admin'
# for security, best to set admin password in an environment variable
ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD')
# don't share this with anybody.
SECRET_KEY = '=iwzuh2hjvld!8kpb674(-@wk)r$_i=kmp%-t^jg0c8=zv+_fb'
AUTH_LEVEL = environ.get('OTREE_AUTH_LEVEL')
# setting for integration with AWS Mturk
AWS_ACCESS_KEY_ID = environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = environ.get('AWS_SECRET_ACCESS_KEY')
# e.g. EUR, CAD, GBP, CHF, CNY, JPY
REAL_WORLD_CURRENCY_CODE = 'USD'
USE_POINTS = True
POINTS_DECIMAL_PLACES = 2
# e.g. en, de, fr, it, ja, zh-hans
# see: https://docs.djangoproject.com/en/1.9/topics/i18n/#term-language-code
LANGUAGE_CODE = 'en'
# if an app is included in SESSION_CONFIGS, you don't need to list it here
INSTALLED_APPS = ['otree', 'radiogrid', ]
DEMO_PAGE_INTRO_TEXT = """
oTree games
"""
mturk_hit_settings = {
'keywords': ['easy', 'bonus', 'choice', 'study'],
'title': 'Brief psychological study (2 minutes max.)',
'description': 'A brief psychological study',
'frame_height': 700,
'preview_template': 'global/MTurkPreview.html',
'minutes_allotted_per_assignment': 10,
'expiration_hours': 7 * 24, # 7 days
# 'grant_qualification_id': 'YOUR_QUALIFICATION_ID_HERE',# to prevent retakes
'qualification_requirements': [
{
'QualificationTypeId': "00000000000000000071",
'Comparator': "EqualTo",
'LocaleValues': [{'Country': "US"}]
},
]
}
# 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 = {
'real_world_currency_per_point': 0.000,
'participation_fee': 0.50,
'doc': "",
'mturk_hit_settings': mturk_hit_settings,
}
SESSION_CONFIGS = [
{
'name': 'bigfive',
'display_name': 'mini big Five',
'num_demo_participants': 1,
'app_sequence': ['bigfive'],
'use_browser_bots': False
},
]