启动django的bat
每次启动django,都要进入cmd,然后命令又记不住.干脆写个bat来启动:
@echo off
python C:\Documents and Settings\Administrator\mysite\manage.py runserver
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul
结果报告找不到Documents
忘记了是在笨笨的windows下,加了引号就可以了:
@echo off
python “C:\Documents and Settings\Administrator\mysite\manage.py” runserver
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul
直接启动有问题,要到他的目录下启动,于是改为:
@echo off
cd “C:\Documents and Settings\Administrator\mysite\”
python manage.py runserver
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul