Django: dynamic database file
In my Django project I have a dependency for a third party application that produces SQLite cache files in various directories with a known schema. I'd like to use Django models to access those databases, but obviously I cannot use a static DATABASES setup. How can I dynamically open a SQLite database on an arbitrary path? EDIT As Byron Ruth pointed out, the solution is to use the django.db.connections in conjunction with the using function in the QuerySet. Byron Ruth The django.db.connections is a simple wrapper around DATABASES defined in your settings. The wrapper class is here: django.db