Django 1.4未知命令:'runserver' [英] Django 1.4 Unknown command: 'runserver'

查看:1148
本文介绍了Django 1.4未知命令:'runserver'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的python路径中的某些东西必须改变,因为现在我无法运行。

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

python app/manage.py runserver

我得到的输出是

Unknown command: 'runserver'
Type 'manage.py help' for usage.

我已经看过我的环境的PYTHONPATH和PATH变量,但是我不知道为什么它没有运行。

I've looked at my environment's PYTHONPATH and PATH variables, but I can't figure out why its not running.

推荐答案

我找到了我的问题的答案。

I've found the answer to my question.


  • 如果您的设置有错误,manage.py将会将该异常和报告作为该命令不存在。

  • 导致我错误地假设我的python路径或venv环境被弄乱了的路径。

如果你想诊断这个问题,运行...

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

python app/manage.py help

...它将显示异常。这当然是django shell在告诉我没有找到命令之后推荐的。

... 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.

这显然是Django 1.4中的一个错误。在我看来,无论你运行什么管理命令,都应该报告异常。

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.

这篇关于Django 1.4未知命令:'runserver'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆