我剛升級到Django 1.4,它已經打破了幾件事情,包括消息。剛剛升級到Django 1.4,並收到錯誤消息
這裏是試圖改變一個化身,當我得到的錯誤:
'User' object has no attribute 'message_set'
Exception Location: /Users/nb/Desktop/myenv2/lib/python2.7/site-packages/django/utils/functional.py in inner, line 185
回溯:
File "/Users/nb/Desktop/myenv2/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/nb/Desktop/myenv2/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
20. return view_func(request, *args, **kwargs)
File "/Users/nb/Desktop/spicestore/apps/avatar/views.py" in change
76. request.user.message_set.create(
File "/Users/nb/Desktop/myenv2/lib/python2.7/site-packages/django/utils/functional.py" in inner
185. return func(self._wrapped, *args)
Exception Type: AttributeError at /avatar/change/
Exception Value: 'User' object has no attribute 'message_set'
此外,消息不再適用於網站上。 Django 1.4中有哪些變化可能會導致這種情況,並且有人會克服類似的問題?