Ticket #986 (new defect)
Opened 2 years ago
Unsupported db backend results in wrong error message
|Reported by:||martin maney||Owned by:||andrew|
I don't have all the details on the setup, but a fellow asked on #django-south about trouble using django-mongodb (in a multi-db setup, of course) with South. I don't think there's anything to be done for him until someone fixes up a mongodb backend for South, but while looking for the root cause I spent some time in db/init.py, and I think there's some refactoring gone awry (I'll quote from current head, but it's unchanged since 0.7.3 anyway).
The message reported was "There is no South database module 'south.db.None' for your database ..." which is issued from the failure case in the loop at lines 59-61. My first hint that something was wrong was the comment suggesting that this wasn't supposed to fail except in 1.1 (pre-multidb). Looking up above to the 1.2 branch of the setup code, it appears that db_engines is now setup using the string name of the South module (35-41, esp 37), but the sanity checking code that follows is checking for None... which of course never matches 'south.db.None' at line 44... and that's the obvious fix, of course.