阅读背景:

manage.py runserver因messgae失败“未知命令:'runserver'”

来源:互联网 

I'm running a django project in docker container, when I run python manage.py runserver or python manage.py runserver 0.0.0.0:8000 it works, but when I run python manage.py runserver --settings=configs.local_default which is what I actually need gets error message:

我正在docker容器中运行django项目,当我运行python manage.py runserver或python manage.py runserver 0.0.0.0:8000它可以工作,但是当我运行python manage.py runserver --settings = configs.local_default时是我实际需要得到的错误信息:

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

The running django version is 1.3.1

正在运行的django版本是1.3.1

1 个解决方案

#1


The issue it probably that you're working with Django 1.3 which is poorly documented and pretty buggy. Just use one of the more recent versions. Both 1.7 and 1.8 are really good. The tutorials on the Django website are more than enough to catch you up on the changes and it's much more efficient than working with 1.3. The entire server structure is much more organized and hence way easier to debug especially when working with multiple apps. The plug-n-play aspect makes it particularly easy. It won't be hard to port your code either.

问题可能是你正在使用Django 1.3,这是一个很难记录和非常错误的。只需使用一个较新的版本。 1.7和1.8都非常好。 Django网站上的教程足以让您了解更改,它比使用1.3更有效。整个服务器结构更加有条理,因此更容易调试,尤其是在处理多个应用程序时。即插即用方面使它变得特别容易。端口代码也不难。


分享到: