Created
November 15, 2011 12:16
-
-
Save jacob414/1366943 to your computer and use it in GitHub Desktop.
Test registry and instantiation of DjangoCMS plugin objects
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.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