import os from dotenv import load_dotenv from pathlib import Path env_path = Path(__file__).parent / "config" / ".env" if not env_path.is_file(): raise ValueError("No .env file found in config folder") load_dotenv(env_path) JOINT_CONFIG = { "app_sequence": ["vote_price_antitrust"], "num_demo_participants": 3 } MODES = ["profit", "revenue", "overcharge"] SESSION_CONFIGS = [ { **JOINT_CONFIG, "name": f"Cartel_fines_{mode}", "mode": mode } for mode in MODES ] # 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.10, "participation_fee": 0.00, "players_per_group": 3, "doc": "" } PARTICIPANT_FIELDS = [] SESSION_FIELDS = [ #('treatment', str), # treatment field of string type ] # ISO-639 code # for example: de, fr, ja, ko, zh-hans LANGUAGE_CODE = 'en' # e.g. EUR, GBP, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'EUR' USE_POINTS = True ROOMS = [ dict( name='CartelFines', display_name='Laboratory Experiment on Cartels', participant_label_file='_rooms/cartelfines.txt', ), dict(name='live_demo', display_name='Room for live demo (no participant labels)'), ] ADMIN_USERNAME = os.environ.get("DB_USER") # for security, best to set admin password in an environment variable ADMIN_PASSWORD = os.environ.get("DB_PASS") DEMO_PAGE_INTRO_HTML = """ Choose the treatment for the demo. """ SECRET_KEY = os.environ.get("SECRET_KEY") INSTALLED_APPS = [ 'otree', 'chat_from_scratch', ]