Django-CMS publish page programatically.

180 views
Skip to first unread message

czpython

unread,
May 31, 2012, 3:22:32 AM5/31/12
to django-cms...@googlegroups.com
Hey Guys,

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 ?

Thanks,
Reply all
Reply to author
Forward
0 new messages