[Django]-Django comment moderation error: AlreadyModerated at /

7๐Ÿ‘

โœ…

Just had a similar problem today, but I think Iโ€™ve solved it ๐Ÿ™‚
In my case the issue was that django was loading models.py twice and therefore trying to register the model for comment moderation twice as well. I fixed this by modifying the code from:

moderator.register(Post, PostModerator)

to:

if Post not in moderator._registry:
    moderator.register(Post, PostModerator)

0๐Ÿ‘

I imagine that CommentModerator (the superclass for PostModerator) is moderated by default?

Leave a comment