The bat assumed it was started from the repo root — python couldn't find manage.py when the Claude preview runner (or any other launcher) started it from elsewhere. cd /d "%~dp0" pins it to the script's own directory. .claude/launch.json (gitignored) now also passes the bat's absolute path so cmd finds it regardless of working directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
682 B
Batchfile
14 lines
682 B
Batchfile
@echo off
|
|
REM === Local dev launcher ===
|
|
REM cd to this script's own folder first (%~dp0 = the .bat's directory) so
|
|
REM "python manage.py ..." works no matter where the launcher was started
|
|
REM from (the Claude preview runner starts cmd outside the project root).
|
|
cd /d "%~dp0"
|
|
REM USE_SQLITE=true -> use SQLite, skip MySQL requirement, relax prod-only checks
|
|
REM DJANGO_DEBUG=true -> make Django's dev server auto-serve /static/ files so
|
|
REM CSS/JS/images load without needing collectstatic (prod
|
|
REM on Flatlogic keeps DEBUG=false; this only affects local)
|
|
set USE_SQLITE=true
|
|
set DJANGO_DEBUG=true
|
|
python manage.py runserver 0.0.0.0:8000
|