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

cannot import name migrations #20

Open
philippeowagner opened this issue Nov 19, 2014 · 2 comments
Open

cannot import name migrations #20

philippeowagner opened this issue Nov 19, 2014 · 2 comments

Comments

@philippeowagner
Copy link
Member

With Django==1.4.16 and django-cms==2.4.3 I got the following error.

Traceback (most recent call last):
  File "/var/www/exmple.com/www/lib/python2.7/site-packages/south/migration/base.py", line 302, in migration
    migration = __import__(full_name, {}, {}, ['Migration'])
  File "//var/www/exmple.com/www/lib/python2.7/site-packages/cmsplugin_contact_plus/migrations/0001_initial.py", line 4, in <module>
    from django.db import models, migrations
ImportError: cannot import name migrations

There is a note in the README but this should work anyway.

Affected cmsplugin-contact-plus version: 1.1.13

@walterrenner
Copy link
Contributor

looks like south is trying to use the django migrations.
This issue is described in the django ducumentation and the south release notes

I suggest to create an south_migrations directory and add an empty __init__.py.

@walterrenner
Copy link
Contributor

if you won't or can't update south to v1.0 you can try the second option

If your users are stubborn and refuse to upgrade South, they may instead change the SOUTH_MIGRATION_MODULES setting for your app to point to the new south_migrations directory.

for cmsplugin_contact_plus this would be:

SOUTH_MIGRATION_MODULES = {
    'cmsplugin_contact_plus': 'ignore',  # south migrations not supported by cmsplugin_contact_plus
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants