from os import environ # 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'] region_name ='us-east-1' AWS_ACCESS_KEY_ID='AKIAJ7CW44KKFUATXUTA' AWS_SECRET_ACCESS_KEY='sw3FkdyjtfEAVuUBWMGOfjmAWpUTGLKIYlNpgYZo' mturk_hit_settings = { 'keywords':['public goods game, bonus,'], 'title': 'Recruitment of experiment participant', # remember to change according to different hits 'description': 'This is a recruitment advertisement for experiment participants.', # 'description': 'You will participate in a public goods game experiment of 16 people, and your income will be determined by the decision-making behavior of you and others.', 'frame_height': 500, 'template': 'global/mturk_template.html', 'minutes_allotted_per_assignment': 60, 'expiration_hours': 24, 'qualification_requirements': [], 'grant_qualification_id':'370A5JMB030QE9VWJJF0UQVQFNBRQB', # to prevent retakes 'qualification_requirements': [ { 'QualificationTypeId': "3ZSPHI510NVWZNO0Y61IJXIDEW0JI8", 'Comparator': "DoesNotExist", }, # { # 'QualificationTypeId': "00000000000000000071", # 'Comparator': "EqualTo", # 'LocaleValues': [{'Country': "US"}] # }, ] } SESSION_CONFIG_DEFAULTS = { 'real_world_currency_per_point':0.001, #如果SESSION_CONFIG中每个section有具体的汇率及参与费用,会优先选择下面的 'participation_fee':0.03, 'doc':"", 'mturk_hit_settings': mturk_hit_settings } # the environment variable OTREE_PRODUCTION controls whether Django runs in # DEBUG mode. If OTREE_PRODUCTION==1, then DEBUG=False if environ.get('OTREE_PRODUCTION') not in {None, '', '0'}: DEBUG = False else: DEBUG = True SESSION_CONFIGS = [ # dict( # name='return_pgg_bonus', # display_name="return_pgg_bonus", # num_demo_participants=5, # app_sequence=['return_pgg_bonus'] # ), dict( name='my_ad_survey', display_name="Recruitment of experiment participant", num_demo_participants=1, app_sequence=['my_ad_survey'] ), # dict( # name='common_value_auction', # display_name="Common Value Auction", # num_demo_participants=3, # app_sequence=['common_value_auction', 'payment_info'] # ), # dict( # name='bargaining', # num_demo_participants=3, # app_sequence=['bargaining'] # ), # dict( # name='cournot', # num_demo_participants=2, # # real_world_currency_per_point=1.000, #汇率 # app_sequence=['cournot'] # ), # dict( # name='my_cournot', # num_demo_participants=4, # app_sequence=['my_cournot'] # ), dict( name='public_goods_game', num_demo_participants=16, app_sequence=['my_simple_survey', 'my_public_goods_2', 'payment_info'] # app_sequence=['my_public_goods_2'] ), # dict( # name='public_goods_2', # num_demo_participants=20, # # app_sequence=['my_simple_survey', 'my_public_goods_2', 'payment_info'] # app_sequence=['public_goods_2'] # ), # dict( # name='my_simple_survey', # num_demo_participants=3, # app_sequence=['my_simple_survey'] # ), # dict( # name='public_goods_2', # display_name="Public Goods 2019", # num_demo_participants=2, # app_sequence=['public_goods_2'], # ), # dict( # name='guess_two_thirds', # display_name="Guess 2/3 of the Average", # num_demo_participants=3, # app_sequence=['guess_two_thirds', 'payment_info'], # use_browser_bots=True, # ), # dict( # name='survey', # display_name='survey', # num_demo_participants=1, # app_sequence=['survey', 'payment_info'], # ), # dict( # name='traveler_dilemma', # display_name="Traveler's Dilemma", # num_demo_participants=2, # app_sequence=['traveler_dilemma', 'payment_info'] # ), # dict(name='trust', display_name="Trust Game", num_demo_participants=2, app_sequence=['trust', 'payment_info']), # dict(name='trust_simple', display_name="Trust Game (simple version from tutorial)", num_demo_participants=2, # app_sequence=['trust_simple']), # dict(name='volunteer_dilemma', display_name="Volunteer's Dilemma", num_demo_participants=3, # app_sequence=['volunteer_dilemma', 'payment_info']), # dict(name='prisoner', display_name="Prisoner's Dilemma", num_demo_participants=2, # app_sequence=['prisoner', 'payment_info']), ] # 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 = True #通过修改为False,将Points转变成真正的货币 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' # ADMIN_USERNAME = environ.get('OTREE_ADMIN_USERNAME') # for security, best to set admin password in an environment variable # ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD') ADMIN_PASSWORD = '343234fyh' DEMO_PAGE_INTRO_HTML = """ Here are some oTree games. """ # don't share this with anybody. SECRET_KEY = '6lertt4wlb09zj@4wyuy-p-6)i$vh!ljwx&r9bti6kgw54k-h8' INSTALLED_APPS = ['otree'] # AUTH_LEVEL: # If you are launching a study and want visitors to only be able to # play your app if you provided them with a start link, set the # environment variable OTREE_AUTH_LEVEL to STUDY. # If you would like to put your site online in public demo mode where # anybody can play a demo version of your game, set OTREE_AUTH_LEVEL # to DEMO. This will allow people to play in demo mode, but not access # the full admin interface. AUTH_LEVEL = 'DEMO' # inactive session configs # dict(name='trust', display_name="Trust Game", num_demo_participants=2, app_sequence=['trust', 'payment_info']), # dict(name='prisoner', display_name="Prisoner's Dilemma", num_demo_participants=2, # app_sequence=['prisoner', 'payment_info']), # dict(name='volunteer_dilemma', display_name="Volunteer's Dilemma", num_demo_participants=3, # app_sequence=['volunteer_dilemma', 'payment_info']), # dict(name='cournot', display_name="Cournot Competition", num_demo_participants=2, app_sequence=[ # 'cournot', 'payment_info' # ]), # dict(name='dictator', display_name="Dictator Game", num_demo_participants=2, # app_sequence=['dictator', 'payment_info']), # dict(name='matching_pennies', display_name="Matching Pennies", num_demo_participants=2, app_sequence=[ # 'matching_pennies', # ]), # dict(name='traveler_dilemma', display_name="Traveler's Dilemma", num_demo_participants=2, # app_sequence=['traveler_dilemma', 'payment_info']), # dict(name='bargaining', display_name="Bargaining Game", num_demo_participants=2, # app_sequence=['bargaining', 'payment_info']), # dict(name='common_value_auction', display_name="Common Value Auction", num_demo_participants=3, # app_sequence=['common_value_auction', 'payment_info']), # dict(name='bertrand', display_name="Bertrand Competition", num_demo_participants=2, app_sequence=[ # 'bertrand', 'payment_info' # ]), # dict(name='public_goods_simple', display_name="Public Goods (simple version from tutorial)", # num_demo_participants=3, app_sequence=['public_goods_simple', 'payment_info']), # dict(name='trust_simple', display_name="Trust Game (simple version from tutorial)", num_demo_participants=2, # app_sequence=['trust_simple']),