Fantomas42/django-blog-zinnia — pull request #360 by benjaoming (2014-08-02 18:24:18+00:00)
Title: Migrations broken in Django 1.5?

This introduces Django 1.4 compat and fixes a problem migrating in South 1.0 + Django 1.5.x:

-> % python manage.py migrate --traceback
Traceback (most recent call last):
File "local/lib/python2.7/site-packages/django/core/management/base.py", line 222, in run_from_argv
self.execute(*args, **options.__dict__)
File "local/lib/python2.7/site-packages/django/core/management/base.py", line 255, in execute
output = self.handle(*args, **options)
File "local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 87, in handle
apps = list(migration.all_migrations())
File "local/lib/python2.7/site-packages/south/migration/base.py", line 33, in all_migrations
yield Migrations(app)
File "local/lib/python2.7/site-packages/south/migration/base.py", line 64, in __call__
self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
File "local/lib/python2.7/site-packages/south/migration/base.py", line 90, in __init__
self.set_application(application, force_creation, verbose_creation)
File "local/lib/python2.7/site-packages/south/migration/base.py", line 162, in set_application
module = importlib.import_module(self.migrations_module())
File "local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "local/lib/python2.7/site-packages/zinnia/migrations/__init__.py", line 8, in
user_model_label = '%s.%s' % (User._meta.app_label, User._meta.model_name)
AttributeError: 'Options' object has no attribute 'model_name'