I have some Django middleware code that connects to a database. I want to turn the middleware into a reusable application ("app") so I can package it for distribution into many other projects, without needing to copy-and-paste.
I don't understand where a reusable application is supposed to configure itself. Since it's intended for redistribution I don't have the ability to write the central settings.py myself. Looking at the Django documentation I see there's settings.configure but it appears to replace the entire configuration, instead of letting me "splice" a new database into DATABASES.
What's the right way to give my reusable middleware app the ability to configure its own database connection? I don't want it to interfere with the databases of applications where I'll be installing it. Thanks.