Django 1.4 Unknown command: 'runserver'

前端 未结 4 1742
清歌不尽
清歌不尽 2021-02-08 02:52

Something in my python path must have changed because now I cannot run the.

python app/manage.py runserver

The output I get is

         


        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-08 03:13

    I've found the answer to my question.

    • If you've got an error in your settings, manage.py will swallow the exception and report as if the command does not exist.
    • This lead me down the path of incorrectly assuming my python path or venv environment was messed up.

    If you want to diagnose this issue, run...

    python app/manage.py help
    

    ... and it will show the exception. This, of course, was what was recommended by the django shell after it had told me that the command was not found.

    This is clearly a bug in Django 1.4. It seems to me, an Exception should be reported regardless of what management command you run.

提交回复
热议问题