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.2.1.tar.gz (21.2 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.2.1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_omnitenant-0.2.1.tar.gz
  • Upload date:
  • Size: 21.2 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.2.1.tar.gz
Algorithm Hash digest
SHA256 884d419c2d540a4eb8372aff7107cd31b975f24b656f8db7476b68abbbf69370
MD5 43eecffe146ed24860c9ad9ecd6b0fd2
BLAKE2b-256 d04550b7ae9c6e713ff0915d148682917fb45c1ba68454ad25ef7bb3a632729d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_omnitenant-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5869baed2cba2d50e137e5dfa76457cae71124cc5d013dcf3e57abb7c9d30bc9
MD5 71a51967a9bbf71b931e9081cf79146d
BLAKE2b-256 c9e6a5f4cd7381c66a4810af24792cb0d3dc9239c7701a5ab93cbe1b5bc06bbc

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