Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 3f8547564c feat(admin): Phase 1 注册邀请码逻辑 — 码必填 + kind 分流 + validate-invite + 注册页码优先重做
后端:Invitation.kind(join_team/create_team)+ team 可空 + migration;RegisterSerializer 邀请码必填,
create_team 开新团队当 owner+发试用额度、join_team 幂等入伙不重复发额度,删「空码开团队」;
validate-invite 免登录验码端点;团管发码恒 join_team;InvitationSerializer 增 kind/team_name。
前端:注册页码优先(验过才展开;create_team 填团队名 / join_team 只读团队名,不暴露团队列表)、
邀请链接 ?invite= 自动验码、api.validateInvite、验码行/状态提示样式(仅 token)。
测试:accounts 22/22 单测过(RegisterInviteCodeTests + ValidateInviteTests);
无头 e2e _admin-p1.mjs 全断言过 + 0 console error;tsc+build 绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 21:07:03 +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