Created
August 8, 2013 14:08
-
-
Save rolo/6184882 to your computer and use it in GitHub Desktop.
Automatically republish all Django CMS 2.4.2 pages which are already published. For when all pages needed republishing after an upgrade from 2.3.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cms.models.pagemodel import Page | |
pages = Page.objects.filter(published=True, publisher_is_draft=True) | |
for page in pages: | |
print '%s (%d)' % (page, page.id) | |
page.publish() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment