1

我正在尝试django-mptt-comments在我的 django 项目上使用应用程序,但是当我尝试发表评论时遇到了问题。

我得到错误:AttributeError: 'NoneType' object has no attribute 'level'

这是回溯:https ://gist.github.com/1481179

您会在回溯中注意到错误发生在第 93 行的 appp 的 form.py 中。代码如下所示:https ://gist.github.com/1481191

谁能告诉我可能导致此问题的原因以及如何解决此问题。谢谢。

4

1 回答 1

0

我没有使用 django-mptt-comments,但我在堆栈跟踪中看到了一些可疑的东西,看起来表单在 django/contrib/comments/forms.py 中被初始化,这听起来有点奇怪。

也许您安装了 django.contrib.comments 应用程序并且它以某种方式交互?

于 2011-12-15T19:51:39.710 回答