Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not create South database models in Django 1.7

Django 1.7 has built-in database migration mechanizm. However, I'd like to run South migrations for the ols third-party django apps.

I failed to to 'syncdb' management command with Django 1.7 in order to create South models:

/south/management/commands/syncdb.py", line 82, in handle_noargs
old_app_store, cache.app_store = cache.app_store, SortedDict([

AttributeError: 'Apps' object has no attribute 'app_store'
like image 757
Daria Avatar asked May 19 '14 04:05

Daria


3 Answers

If you started a project on Django 1.6 but have upgraded to Django 1.7, you may not see this error immediately. But if you then do a fresh checkout and db build for the project, this mysterious error will crop up.

The solution is to remove South from your INSTALLED_APPS (and likely pip's requirements.txt as well). You don't need them anymore.

like image 165
shacker Avatar answered Oct 16 '22 21:10

shacker


On official South site:

South will not work with Django 1.7; it supports only versions 1.4, 1.5 and 1.6.

The only solution I can see is to create django 1.7 for third-party applications within your project using MIGRATION_MODULES setting. When these third-party applications will supply django 1.7 migrations. you should remove your migrations and do migrate --fake with application migrations.

like image 34
Sergey Fedoseev Avatar answered Oct 16 '22 20:10

Sergey Fedoseev


https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south

This is part of the stable 1.7 release. You should utilise this process if you're upgrading from 1.6 to 1.7

like image 37
Llanilek Avatar answered Oct 16 '22 19:10

Llanilek