【Python】为什么django在1.8版本之后就不支持runfcgi的命令了?
当我们使用python django manage.py runfcgi 时,有时候会出现错误:
Unknown command: ‘runfcgi’
这是由于django版本,在1.9以上不支持runfcgi命令,如果要使用 runfcgi,将django的版本 更换到 1.8 就可以了
https://blog.csdn.net/zhangru...
回答
On Mon, Jul 15, 2013 at 10:06 AM, Curtis Maloney <[email protected]> wrote:
As much as I recognise FastCGI is pretty much a dead technology in the Python world, for people stuck with cPanel sites like HostGator, it still appears to be, pretty much, the only option.
And installing uWSGI there is simply not an option there.
So unless there's a pure python FastCGI -> WSGI library built that supports Django, we're just closing the door on this avenue...
[I say this despite my personal loathing of HostGator... :)]
This would be my concern as well.
I have no love for FastCGI as a platform, but there's a wide range of hosting providers out there, especially at the cheap end, that don't provide a WSGI option.
The right option here may well be to say "Tough Luck" to these people and and encourage them to move to different hosting providers. However, I don't want to rush into this decision without considering the effect on the low end of our user base.
Yours,
Russ Magee %-)
- WSGI 已经成为 Python Web 部署事实上的标准。无论是 mod_wsig 、 gunicorn 、 uwsgi 对 WSGI 的支持已经很完善;另一方面,几乎所有的 Python Web 框架都会对 WSGI 进行适配。
- FastCGI 属于语言无关的 socket 通信,在使用 FastCGI 的时候,框架还是要先起一个 WSGIServer 服务,所以,即使 django 移除了 FastCGI 支持,仍然可以拿一个 WSGIServer 起 app ,然后 fastcgi_pass 到这...so ,写 WSGIServer 这事情就交给专人做吧,框架就该减减身子, django 已经向重型化发展了
我猜测一下, runfcgi使用FCGI并且依赖flup,平时的测试环境直接runserver就行了,
可见runfcgi可能是django想要给用户提供在生产环境的。
而django是一个后端框架,应该集中精力在框架本身,而不是框架与服务器的交互,这部分应该由用户来自己选择。
以上是 【Python】为什么django在1.8版本之后就不支持runfcgi的命令了? 的全部内容, 来源链接: utcz.com/a/80116.html