django-moderation

13 views
Skip to first unread message

Bernhard Schelling

unread,
Sep 11, 2019, 8:39:12 AM9/11/19
to Django users

Python 3.6.8 and django-moderation 0.5.0. I'm using moderation on the cms page model. Basic moderation works - but I don't want to moderate the creation of new pages, only the publishing of existing ones. 


I'm trying to achieve this by overriding is_auto_approve but the method never gets called.


I'm pretty much just starting on django so any input would be highly appreciated :)

this is what I'm trying to do in moderation.py


from moderation import moderation
from moderation.db import ModeratedModel
from moderation.moderator import GenericModerator
from cms.models import Page

class PageModerator(GenericModerator):
    def is_auto_approve(self, obj, user):
        #...check - no moderation for page creation only for publishing 
        super(PageModerator, self).is_auto_approve(obj, user)

moderation.register(Page, PageModerator)
Reply all
Reply to author
Forward
0 new messages