Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 51d5010c43 fix(admin): Django 自带后台挪到 /django-admin/,/admin/* 回落 SPA,修后台刷新 404
前端平台后台用客户端路由 /admin/*,但 nginx 把 /admin/ 反代给了 Django(只有自带后台),
刷新 /admin/prompts 等 → Django 404。把 Django 后台挪 /django-admin/、nginx 同步改,
/admin/* 落到 try_files → index.html(SPA 路由)。Django admin 命名空间仍是 admin,reverse 不变。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 02:04:08 +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