[英]Converting from mod_python to mod_wsgi
My website is written in Python and currently runs under mod_python with Apache. 我的网站是用Python编写的,目前在Apache的mod_python下运行。 Lately I've had to put in a few ugly hacks that make me think it might be worth converting the site to mod_wsgi.
最近我不得不加入一些让我认为可能值得将网站转换为mod_wsgi的丑陋黑客。 But I've gotten used to using some of mod_python's utility classes, especially
FieldStorage
and Session
(and sometimes Cookie
), and from a scan of PEP 333 , I don't see any equivalents to these. 但是我已经习惯了使用一些mod_python的实用程序类,特别是
FieldStorage
和Session
(有时候是Cookie
),而且从PEP 333的扫描中,我看不到它们的任何等价物。 (Not surprising, because I understand that those kinds of utilities don't belong in the WSGI spec) (这并不奇怪,因为我了解这些实用程序不属于WSGI规范)
Question is, are there "standard" (ie commonly accepted) replacements for these mod_python utility classes that I can use in WSGI, or could I/should I write my own? 问题是,我可以在WSGI中使用这些mod_python实用程序类的“标准”(即通常接受的)替换,还是我/我应该自己编写?
(FYI: currently using Python 2.5) (仅供参考:目前正在使用Python 2.5)
请看一下whiff - 它提供内置功能,用于操作现场数据和会话等基于wsgi的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.