feat: 视频与控制程序合并

This commit is contained in:
2026-04-04 23:25:52 +08:00
parent 1a41905d4c
commit b0dcf7b571
17 changed files with 1674 additions and 554 deletions

View File

@@ -1,7 +1,13 @@
import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
def _split_csv_env(name: str) -> list[str]:
value = os.getenv(name, "")
return [item.strip().rstrip("/") for item in value.split(",") if item.strip()]
SECRET_KEY = 'django-insecure-pk4scm@ifo%mao6l=j0@-$_v+pg-43^hj4a!199^)zivz-_8xu'
DEBUG = True
ALLOWED_HOSTS = ["*"]
@@ -87,3 +93,16 @@ STATIC_URL = 'static/'
CORS_ALLOW_ALL_ORIGINS = True
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CONTROL_WS_ALLOWED_ORIGINS = _split_csv_env('CONTROL_WS_ALLOWED_ORIGINS') or [
'http://127.0.0.1',
'http://127.0.0.1:5173',
'http://127.0.0.1:4173',
'http://127.0.0.1:8001',
'https://127.0.0.1',
'http://localhost:5173',
'http://localhost:4173',
'http://localhost',
'http://localhost:8001',
'https://localhost',
]