django 1.3升级问题

发布于 2024-12-06 15:40:41 字数 898 浏览 0 评论 0原文

我最近升级到 django 1.3。升级后,每当我使用 request.POST 时,我都会收到以下错误:

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 86, in  get_response
response = None

File "/public/gdp/trunk/src/ukl/lis/process/utils/error_handler.py", line 15, in __call__
return self.function(*args, **kwargs)

File "/usr/lib/python2.4/site-packages/django/views/decorators/cache.py", line 30, in _cache_controlled
# and this:

File "/public/gdp/trunk/src/ukl/lis/process/authentication/views.py", line 438, in login
form = loginForm(request.POST)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 101, in _get_post
self._load_post_and_files()

AttributeError: 'ModPythonRequest' object has no attribute '_load_post_and_files'

一旦我恢复到 django 1.0,错误就被修复了。

为什么 django 1.3 单独抛出这个错误?如何纠正呢?

I recently updgraded to django 1.3. After the upgrade, I get the following error whenever I used request.POST:

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 86, in  get_response
response = None

File "/public/gdp/trunk/src/ukl/lis/process/utils/error_handler.py", line 15, in __call__
return self.function(*args, **kwargs)

File "/usr/lib/python2.4/site-packages/django/views/decorators/cache.py", line 30, in _cache_controlled
# and this:

File "/public/gdp/trunk/src/ukl/lis/process/authentication/views.py", line 438, in login
form = loginForm(request.POST)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 101, in _get_post
self._load_post_and_files()

AttributeError: 'ModPythonRequest' object has no attribute '_load_post_and_files'

Once I reverted back to django 1.0 the error is fixed.

Why is django 1.3 alone throwing this error? How to correct it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

玩套路吗 2024-12-13 15:40:41

从 Django 1.0 到 Django 1.3 是一个很大的跳跃,很多项目可能已被弃用或不再使用,我建议您仅检查 middleware_classes 的一些文档

Django 中间件文档

Stepping from Django 1.0 to Django 1.3 is a big jump, a lot of items might have been deprecated or no longer used, I recommend you to just check some of the documentation for the middleware_classes

Django Middleware documentation

温柔女人霸气范 2024-12-13 15:40:41

我尝试重新安装 mod-python,现在错误已修复。现在考虑迁移到 mod_wsgi。

I tried re-installing my mod-python and now the error is fixed. Now thinking of migrating to mod_wsgi.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文