|Django-CMS publish page programatically.||czpython||5/31/12 12:22 AM|
I am using the following jquery plugin http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html to make an Off and On switch like the one in the CMS Toolbar.
Basically i want the user to be able to publish and unpublish the page by sliding the on and off. When they do so, the plugin sends an ajax call to a django view that either publishes or unpublish the page.
I use the cms.api.publish_page to publish the page and page.published = False to unpublish it.
Unfortunately it seems like the request is being cached, so once i make a call to publish the page, and in the same browser session i try to unpublish it, it never makes the change.
So my question is, does django-cms internally cache the page ? is there a better way to achieve this functionality ?