我使用arneb/django messages來處理我的django網站上的消息。每當我向用戶發送消息時,它都會帶出下面的錯誤,並且消息仍然會默默傳遞。Django消息屬性錯誤
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django_messages/views.py", line 77, in compose
request.user.message_set.create(
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 185, in inner
return func(self._wrapped, *args)
AttributeError: 'User' object has no attribute 'message_set'
我一直在試圖解決這個問題,但沒有成功。我怎樣才能擺脫這個錯誤?
感謝您的回覆傢伙。我使用的是django 1.4。我只是檢查了一下:github.com/arneb/django-messages不知道它是否會支持django 1.4。你怎麼看? – picomon