Plugin Fails to register when importing api #1526

Closed
czpython opened this Issue Nov 21, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Owner

czpython commented Nov 21, 2012

Hey guys,

First off thanks a lot for this app. I use it almost in every site :).

Now onto the issue, I'm not sure if this is a bug or expected behavior due to import mechanism. Basically when a function from the api is imported anywhere from a cms_plugins.py file the plugin residing in said file fails to register, and thus doesn't show in the admin.

To reproduce this just import

from cms.api import create_page, create_title, add_plugin

at the top of any custom plugin in cms_plugins.py

I'm using:

DjangoCMS 2.3
Django 1.4
Python 2.7.3

Thanks,

Paulo

Member

digi604 commented Jul 11, 2013

this is probably a circular import problem. try importing it in the function you actually use it and not at the top of the file.

digi604 closed this Jul 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment