Skip to content

Instantly share code, notes, and snippets.

@jacob414
Created November 15, 2011 12:16
Show Gist options
  • Save jacob414/1366943 to your computer and use it in GitHub Desktop.
Save jacob414/1366943 to your computer and use it in GitHub Desktop.
Test registry and instantiation of DjangoCMS plugin objects
from cms.plugin_pool import plugin_pool
# ..in production code: class YourPlugin(CMSPlugin)...
# This ensures that the system is aware of your plugin:
YrPluginCls = plugin_pool.plugins.get('YourPlugin', None)
# ..instantiate:
plugin = YrPluginCls()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment