Files
yingqing/core/backend
zycandClaude Opus 4.8 16219a4132 feat: 图片创作每张图加「加入模特库」按钮 (row41)
图片工作台单图「更多」气泡新增「加入模特库」(与「加入资产库」并列):
把该生成图复用为模特形象图建 Model 条目,加入后变「已加入模特库」禁用。

后端新增 POST /api/models/enroll-asset/(ModelLibraryViewSet.enroll_asset):
复用已有资产作 portrait_asset 建 Model,不重新上传/不二次扣费;同一资产幂等返回。
需部署生效(后端)。

构建: tsc --noEmit=0, npm run build=0; 后端 py_compile OK。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:11:50 +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