feat: initialize Django DRF skeleton

This commit is contained in:
QiuSW
2026-07-01 18:01:23 +08:00
parent eeeb45c147
commit 6bbfe7384d
15 changed files with 295 additions and 56 deletions
+4 -7
View File
@@ -12,10 +12,10 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
# 依赖管理 uv / pip 二选一(03-tech-stack 标为待定);默认 pip + requirements.txt。
INSTALL_CMD=(pip install -r requirements.txt) # 或 uv sync
VERIFY_CMD=(python manage.py test) # 基础验证 / 测试
START_CMD=(python manage.py runserver) # 开发启动
# T-001 固定使用系统 Python 3.12,不使用虚拟环境。
INSTALL_CMD=(python3.12 -m pip install -r requirements.txt)
VERIFY_CMD=(python3.12 manage.py check)
START_CMD=(python3.12 manage.py runserver)
ensure_configured() {
local name="$1"
@@ -42,9 +42,6 @@ fi
echo "==> 同步依赖"
"${INSTALL_CMD[@]}"
echo "==> 数据库迁移"
python manage.py migrate
echo "==> 运行基础验证"
"${VERIFY_CMD[@]}"