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
@@ -10,10 +10,10 @@
$ErrorActionPreference = "Stop"
Set-Location -Path $PSScriptRoot
# 依赖管理 uv / pip 二选一(03-tech-stack 标为待定);默认 pip + requirements.txt。
$InstallCmd = "pip install -r requirements.txt" # 或 uv sync
$VerifyCmd = "python manage.py test" # 基础验证 / 测试
$StartCmd = "python manage.py runserver" # 开发启动
# T-001 固定使用系统 Python 3.12,不使用虚拟环境。
$InstallCmd = "py -3.12 -m pip install -r requirements.txt"
$VerifyCmd = "py -3.12 manage.py check"
$StartCmd = "py -3.12 manage.py runserver"
function Assert-Configured {
param(
@@ -41,9 +41,6 @@ if (-not (Test-Path "manage.py")) {
Write-Host "==> 同步依赖"
Invoke-Expression $InstallCmd
Write-Host "==> 数据库迁移"
Invoke-Expression "python manage.py migrate"
Write-Host "==> 运行基础验证"
Invoke-Expression $VerifyCmd