我遇到的错误:
CommandError: One or more models did not validate:
comments.comment: Accessor for field 'content_type' clashes with related field 'ContentType.content_type_set_for_comment'. Add a related_name argument to the definition for 'content_type'.
comments.comment: Reverse query name for field 'content_type' clashes with related field 'ContentType.content_type_set_for_comment'. Add a related_name argument to the definition for 'content_type'.
comments.comment: Accessor for field 'site' clashes with related field 'Site.comment_set'. Add a related_name argument to the definition for 'site'.
comments.comment: Accessor for field 'user' clashes with related field 'User.comment_comments'. Add a related_name argument to the definition for 'user'.
comments.comment: Reverse query name for field 'user' clashes with related field 'User.comment_comments'. Add a related_name argument to the definition for 'user'.
comments.commentflag: Accessor for field 'user' clashes with related field 'User.comment_flags'. Add a related_name argument to the definition for 'user'.
comments.commentflag: Reverse query name for field 'user' clashes with related field 'User.comment_flags'. Add a related_name argument to the definition for 'user'.
一开始,我安装了名为django_comments的较新应用程序,并同步了我的数据库。但是在我决定使用需要 django.contrib.comments的 django-fluent-comments之后。所以我把 django.contrib.comments 放在了 django_comments 中。
同步数据库后,我的 django 项目因上述错误而崩溃。
所以,请帮助解决这个问题或给我一些建议。
感谢您的任何建议!
PS:我尝试用另一个虚拟环境创建新项目并将mysql更改为sqlite3,但仍然有这个错误。