Django 1.4 Unknown command: 'runserver'

前端 未结 4 1731
清歌不尽
清歌不尽 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 02:59

    I agreed with OP. I met the same problem, and it turned out to be an error in settings.py:
    In settings.py I use os.environ[something] and those environment variables are loaded in apache start script. If I run manage.py from the command line, it doesn't know what is os.environ[something] thus error occurs.

    So for anyone here searching for solution, suggestion is to check circumstance difference between running django project and pure manage.py, maybe you'll find what's wrong.

提交回复
热议问题