def handle(self, *args, **options):
        log.info('Reverting drafts to public versions')
        for page in Page.objects.public():
            for language in page.get_languages():
                if CMSPlugin.objects.filter(placeholder__page=page, language=language).exists():
                    log.debug('Reverting page pk=%d' % (page.pk,))
                    page.publisher_draft.revert(language)

        log.info('Publishing all published drafts')
        for title in Title.objects.filter(publisher_is_draft=True, publisher_public_id__gt=0):
            try:
                title.page.publish(title.language)
                log.debug('Published page pk=%d in %s' % (page.pk, title.language))
            except Exception:
                log.exception('Error publishing page pk=%d in %s' % (page.pk, title.language))
Ensure that the public pages look the same as their draft versions.
dataset/ETHPy150Open divio/django-cms/cms/management/commands/subcommands/moderator.py/ModeratorOnCommand.handle