启动django的bat

bigzhu posted @ May 23, 2007 03:43:00 AM in django , 1370 阅读

每次启动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



登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter