Skip to main content

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

  1. Add "django_omnitenant" to your INSTALLED_APPS setting 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


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.1.5.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_omnitenant-0.1.5-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file django_omnitenant-0.1.5.tar.gz.

File metadata

  • Download URL: django_omnitenant-0.1.5.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

Hashes for django_omnitenant-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1512286636abc40e738a0da72b58afe5629c1af7791db8a8ce3f3fe60b421880
MD5 4126d1c5f6b1b5e31194e90227984d70
BLAKE2b-256 12970953ca197f8638ebae7f02e81982d6f9a2f6a00fbde18a9da1a9b2ddca4d

See more details on using hashes here.

File details

Details for the file django_omnitenant-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_omnitenant-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0778d78e6d10db9de03524a9496eddbf0522cf19fd47c88aec905de69be18135
MD5 e64aba379db9889e2001f9c44f36a663
BLAKE2b-256 a938abcf5099f8d745d323de8b483e9866f83a5f13d73efbda2edc7f2e7ec969

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page