from os import environ # Sessions vars1 = dict(gender = "Man", age = "20-30", math = "low") vars2 = dict(gender = "Man", age = "20-30", math = "high") vars3 = dict(gender = "Man", age = "31-40", math = "low") vars4 = dict(gender = "Man", age = "31-40", math = "high") vars5 = dict(gender = "Woman", age = "20-30", math = "low") vars6 = dict(gender = "Woman", age = "20-30", math = "high") vars7 = dict(gender = "Woman", age = "31-40", math = "low") vars8 = dict(gender = "Woman", age = "31-40", math = "high") varsRandom = dict(gender = "random", age = "random", math = "random") lVars = [vars1,vars2,vars3,vars4,vars5,vars6,vars7,vars8] SESSION_CONFIGS = [ dict( name='SessionRandom', app_sequence=['InformedConsent','Calibration','Instructions','Task','Questionnaire','Results'], num_demo_participants=1, vars = varsRandom, ), # dict( # name='Results', # app_sequence=['Results'], # num_demo_participants=1, # vars = vars1, # ), # dict( # name='Questionnaire', # app_sequence=['Questionnaire'], # num_demo_participants=1, # vars = vars1, # ), # dict( # name='Test', # app_sequence=['InformedConsent','Calibration','Instructions','Task','Questionnaire','Results'], # num_demo_participants=10, # vars = varsRandom, # ), ] for i in range(1,9): SESSION_CONFIGS.append( dict( name=f'Session{i}', app_sequence=['InformedConsent','Calibration','Instructions','Task','Questionnaire','Results'], num_demo_participants=1, vars = lVars[i-1], )) # 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'] ROOMS = [ dict( name='room1', display_name='Prolific Room 1' ), dict( name='room2', display_name='Prolific Room 2' ), dict( name='room3', display_name='Prolific Room 3' ), dict( name='room4', display_name='Prolific Room 4' ), ] SESSION_CONFIG_DEFAULTS = dict( real_world_currency_per_point=1.00, participation_fee=0.00, doc="" ) PARTICIPANT_FIELDS = [ 'lTrials', 'lDec', 'lPos', 'sEmployerGender', 'sEmployerAge', 'sEmployerMath', 'lEmployerOrder', 'iCorrect', 'ResultValues', 'iSelectedTrial', 'bChoseA', 'bTimeout', 'bWin', ] SESSION_FIELDS = [ 'dbAnswers', 'dbTrials' ] # 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 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 = """ """ SECRET_KEY = '3543061957543'