config.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import os
  2. import platform
  3. # Base Directory
  4. BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  5. # Debugging
  6. DEBUG = True
  7. # Slicer Settings
  8. # If True, triggers synchronous slicing upon file upload (slower upload, exact metrics on UI)
  9. SYNC_SLICING_ON_UPLOAD = True
  10. IS_WINDOWS = platform.system() == "Windows"
  11. if IS_WINDOWS:
  12. # Default Windows path
  13. SLICER_PATH = r"C:\Program Files\Prusa3D\PrusaSlicer\prusa-slicer-console.exe"
  14. else:
  15. # Default Linux path (binary name if in PATH, or absolute path)
  16. SLICER_PATH = "prusa-slicer"
  17. # Profile configuration (can be changed per machine)
  18. SLICER_CONFIG = os.path.join(BASE_DIR, "printer_profile.ini")
  19. # Order settings
  20. UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
  21. PREVIEW_DIR = os.path.join(UPLOAD_DIR, "previews")
  22. for d in [UPLOAD_DIR, PREVIEW_DIR]:
  23. if not os.path.exists(d):
  24. os.makedirs(d)
  25. # Payment Config
  26. ZIRO_RACUN = "510-1234567890123-45"
  27. COMPANY_NAME = "RADIONICA 3D"
  28. COMPANY_PIB = "01234567"
  29. COMPANY_ADDRESS = "Cetinjski Put, Podgorica, Montenegro"