6
0

base.py 492 B

12345678910111213141516171819202122
  1. import os
  2. import base64
  3. from pathlib import Path
  4. APP_NAME = "pycs2"
  5. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  6. BASE_DIR = Path(__file__).resolve().parent.parent.parent
  7. SOCKETIO_PORT = os.environ.get("PYCS_SOCKETIO_PORT", 5000)
  8. # SECURITY WARNING: don't run with debug turned on in production!
  9. DEBUG = os.environ.get("PYCS_DEBUG", True)
  10. if isinstance(DEBUG, str):
  11. if DEBUG.isdigit():
  12. DEBUG = bool(int(DEBUG))
  13. else:
  14. DEBUG = DEBUG == "True"