classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


Bernhard Schelling

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

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)

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit