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.3.tar.gz (20.1 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.3-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_omnitenant-0.1.3.tar.gz
  • Upload date:
  • Size: 20.1 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.3.tar.gz
Algorithm Hash digest
SHA256 c48ab0dcaadd87e6c0fd0a3c2a34f08dae7d26f0891715eb8f193dce98f88710
MD5 eba73c1da9321cb4044f07a40b0f4a75
BLAKE2b-256 15c6b44487f7627a7f9bdcbf965ad84da6915cb1b72527d05702eba276b69a1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_omnitenant-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2536be8e77dc050de5b610f2de864968718b01059fee4883f48d72ebc6525ea7
MD5 bddb704b0b6a8b7f1d1329ec26d700c4
BLAKE2b-256 c9c5ddc450592133ad13bc1460549cb124a049845b80f48715361642f106762b

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