| 123456789101112131415161718192021222324252627282930313233343536 |
- import os
- import platform
- # Base Directory
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
- # Debugging
- DEBUG = True
- # Slicer Settings
- # If True, triggers synchronous slicing upon file upload (slower upload, exact metrics on UI)
- SYNC_SLICING_ON_UPLOAD = True
- IS_WINDOWS = platform.system() == "Windows"
- if IS_WINDOWS:
- # Default Windows path
- SLICER_PATH = r"C:\Program Files\Prusa3D\PrusaSlicer\prusa-slicer-console.exe"
- else:
- # Default Linux path (binary name if in PATH, or absolute path)
- SLICER_PATH = "prusa-slicer"
- # Profile configuration (can be changed per machine)
- SLICER_CONFIG = os.path.join(BASE_DIR, "printer_profile.ini")
- # Order settings
- UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
- PREVIEW_DIR = os.path.join(UPLOAD_DIR, "previews")
- for d in [UPLOAD_DIR, PREVIEW_DIR]:
- if not os.path.exists(d):
- os.makedirs(d)
- # Payment Config
- ZIRO_RACUN = "510-1234567890123-45"
- COMPANY_NAME = "RADIONICA 3D"
- COMPANY_PIB = "01234567"
- COMPANY_ADDRESS = "Cetinjski Put, Podgorica, Montenegro"
|