arteria / cmsplugin-contact-plus

With cmsplugin-contact-plus building custom forms for your django-cms project is a breeze. Now it's so easy to build the forms with exactly the fields you want in the order you want - with a minimal effort.
https://github.com/arteria/cmsplugin-contact-plus
BSD 3-Clause "New" or "Revised" License
30 stars 33 forks source link

cannot import name migrations #20

Open philippeowagner opened 9 years ago

philippeowagner commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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
}