Skip to content

Instantly share code, notes, and snippets.

@FinalAngel
Created June 4, 2015 11:42
Show Gist options
  • Save FinalAngel/055fdb8a69dd5a68b855 to your computer and use it in GitHub Desktop.
Save FinalAngel/055fdb8a69dd5a68b855 to your computer and use it in GitHub Desktop.
from cms.api import add_plugin
placeholder = page.placeholders.get(slot='content')
add_plugin(placeholder,
'TextPlugin',
self.language_code,
body=self.cleaned_data['content'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment