我正试图在我的Django应用程序引擎项目中实现消息中间件,但它给出了如下错误消息:
ImproperlyConfigured: Error importing middleware mediautils.middleware: "No module named messages"
我跟踪了链接 http://djangoadvent.com/1.2/messages-rest-us/ 实现它。是否不可能将此中间件与Google应用程序引擎一起使用?如果是这样的话,有没有其他方法可以获得与谷歌应用引擎和django相同的功能?
在谷歌应用程序引擎上运行它需要做哪些更改?
请建议。
事先谢谢。
GAE中包含的最新Django is 1.1 ;在1.2中添加了新的消息传递框架。
我使用了以下代码来实现相同的功能:
from django.contrib.auth.models import Message Message(user=request.user, message="Date Updated Successfully").put()
虽然
request.user.message_set.create(message=“数据更新成功”)
不工作。