Skip to main content

Django router for apps with more than 1 database

Project description


django-database-for-apps is a package that provides a router which chooses a database based on app name.


Install with pip or pipenv:

pip install django-database-for-apps

Add django_database_for_apps to your installed apps in your file:


Configure DB routers:



# list of apps and theirs database
    'test_project': 'default',
    '*': 'django',

* matches all applications so the default database might be redefined from 'default' to something else.


# allows relations between databases (default: None)


Copyright © 2019, Piotr Roszatycki

This software is distributed under the GNU Lesser General Public License (LGPL 3 or greater).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-database-for-apps, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_database_for_apps-0.1.1-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-database-for-apps-0.1.1.tar.gz (16.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page