A Django app to allow multi-tenancy.
Project description
django-omnitenant
django-omnitenant is a Django app that enables multi-tenancy with DB-level isolation and schema-level isolation.
Detailed documentation is in the "docs" directory.
Quick start
- Add "django_omnitenant" to your
INSTALLED_APPSsetting like this:
INSTALLED_APPS = [
...,
"django_omnitenant",
]
**Note:** Place django_omnitenant at the last in installed apps so that it will reregister all the default only apps to show on default db
**Note:** Make sure `DEFAULT_TENANT_NAME` is postgre schema name complaint
**Note:** Need to set the `DEFAULT_HOST`
### Test
For tests's tenant setup you can override _setup_tenant method to setup tenant but make sure to assign it to the class variable cls.tenant
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django_omnitenant-0.2.0.tar.gz
(20.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_omnitenant-0.2.0.tar.gz.
File metadata
- Download URL: django_omnitenant-0.2.0.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
460b2b97802689105aa98c957ebd84bf6adfc29b8aa2974e07c0e39f290e24a7
|
|
| MD5 |
84fddb0009832fa1687867490e4f4cb2
|
|
| BLAKE2b-256 |
3d5fd1f3828734114d90afbdcf66b790f860a05f8f620518c48172b252b5df4b
|
File details
Details for the file django_omnitenant-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_omnitenant-0.2.0-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37e6b1b9a6189707efa09631ca97c1d14370316b0174f1bfd8efd904a3a9f3d2
|
|
| MD5 |
197a45a97132225e43c373220ed1fbda
|
|
| BLAKE2b-256 |
1fa3e9bc65df03a9ced411c438b06a29c6394f7e45ef6a05c5863da62f7ad286
|