0

According to Django we can keep default database as empty dictionary {} but when we run it , raises Improperly configured database settings.

I have used automated routers in my app files and registered them on settings.py . Django cannot avoid default database .

Even when we define multiple databases with default db , Django will search for queries in default database and gives error table not found in default database. Adding auth_db for auth routers is bad idea cause I have 2 apps and 2 databases in one project file .

Thanks in Advance. #hope

Sagar Panda
  • 561
  • 3
  • 17
Avii
  • 31
  • 1
  • 8
  • http://stackoverflow.com/questions/30226604/ django-runtime-database-switching – Bij Baj Sep 23 '16 at 02:09
  • I have found the multiple database django docs to be massively defective. No you can't set default to {}. See for example my [first ticket](https://code.djangoproject.com/ticket/22620) on this topic and note the lack of responsiveness. My solution was to ignore the auth_db example and just create a router that routed particular apps of my own to particular other databases, with no router at all for the default database. That causes all of the django apps to end up in the default database--- in the true spirit of "default". – Mike O'Connor Oct 03 '16 at 17:35
  • I found [my other ticket](https://code.djangoproject.com/ticket/27164). I see that the core developer is now admitting that the auth router bit is messed up. It's like pulling teeth, however. – Mike O'Connor Oct 03 '16 at 17:50

0 Answers0