开发者

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

开发者 https://www.devze.com 2023-03-09 17:02 出处:网络
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

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?


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!)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消