Files
yingqing/core/backend
seaislee1209 a39d2b8603 feat(video): 视频页「导出全部」— 把项目所有视频片段打包成 zip 下载
- 后端 ProjectViewSet 加 export-clips action:逐段从 TOS 拉取已采用视频片段、内存 zip 打包返回下载
  (单段失败跳过不毁整包;空项目 400);文件名走 RFC5987 UTF-8 编码兼容中文
- 前端视频阶段 queue-bar 在「上传视频」旁加「导出全部」按钮(下载图标 + 导出中/失败态),
  api.exportProjectClips 取 blob → 触发浏览器下载;仅有已完成片段时可点
- 单测 ExportClipsTests:打包全部片段 + 空项目 400

验收:后端单测绿(基线 4 失败零新增);tsc+build 绿;真打包 补水面膜 项目得 950KB zip;无头 0 报错
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:38:31 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info -P threads -c 4   # 线程池 4 并发(出图/视频可并行;勿用 -P solo 串行)

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing