Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I be setting SOUTH_DATABASE_ADAPTERS for my Django app that uses South?

I've extended the mysql backend that comes with Django and it works just great... until I try to use South with my app. Every time I try a schemamigration South tells me

There is no South database module 'south.db.None' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[s] settings, or remove South from INSTALLED_APPS.

So far I've tried adding the following to my settings_local.py:

SOUTH_DATABASE_ADAPTERS = {
    'myapp.database.backends.mysql': "south.db.mysql"
}

to no avail. What am I missing?

like image 710
Trindaz Avatar asked May 30 '11 04:05

Trindaz


2 Answers

SOUTH_DATABASE_ADAPTERS = {
    'default': "south.db.mysql"
}

I only discovered this as a solution after trawling the south code. It seems counter intuitive that you can't just use the value of ENGINE from DATABASES as the key. I'm also inclined to guess it's a bug because doesn't that also mean South would only support one database at a time? (It was detecting my 'myapp.database.backends.mysql' addition, but was ignoring it because 'default':'south.db.None' already existed!)

like image 93
Trindaz Avatar answered Oct 19 '22 22:10

Trindaz


Got this same problem today. Reinstalling south fixed the issue, don't know why though because I already had the latest version.

like image 29
Noel Pure Avatar answered Oct 19 '22 21:10

Noel Pure