Skip to content

Commit

Permalink
Raise error if taggit.migrations imported for Django <=1.6
Browse files Browse the repository at this point in the history
Fixes gh-219.
  • Loading branch information
treyhunner committed Apr 5, 2014
1 parent fddd062 commit edb1753
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions taggit/migrations/__init__.py
@@ -0,0 +1,21 @@
"""
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""

SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.south_migrations',
}
"""

# Ensure the user is not using Django 1.6 or below with South
try:
from django.db import migrations # noqa
except ImportError:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)

0 comments on commit edb1753

Please sign in to comment.