Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing cirular import #97

Merged
merged 1 commit into from Aug 19, 2011
Merged

Fixing cirular import #97

merged 1 commit into from Aug 19, 2011

Conversation

esauro
Copy link

@esauro esauro commented Jul 19, 2011

Fixing a circular import when trying to override default ZINNIA_APP_MENUS in main settings.py.

I could not override the ZINNIA_APP_MENUS setting in the django.conf.settings because I must import the classes from zinnia.plugins.menu and that was a circular import.

I modified the code to use a list of strings instead a list of classes. If you provide a full class name such as 'zinnia.plugins.menu.TagEntry' it imports the module, and construct the class list. If you just provide a class name (not points in the string) it assume is a class defined in 'zinnia.plugins.menu'.

Fantomas42 added a commit that referenced this pull request Aug 19, 2011
@Fantomas42 Fantomas42 merged commit aba5565 into Fantomas42:master Aug 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants