Django: dynamic database file
The django.db.connections is a simple wrapper around DATABASES defined in your settings. The wrapper class is here: django.db.utils#L137-L227 from django.db import connections # Add connection information dynamically.. connections.databases[‘new-alias’] = { … } # Ensure the remaining default connection information is defined. # EDIT: this is actually performed for you in the wrapper class __getitem__ # … Read more