Django multi-tenancy through Postgres schemas
Project description
django-pgschemas
This package uses Postgres schemas to support data multi-tenancy in a single Django project. It is a fork of django-tenants with some conceptual changes:
- There are static tenants and dynamic tenants. Static tenants can have their own apps and urlconf.
- Tenants can be routed via:
- URL using subdomain or subfolder on shared subdomain
- Session
- Headers
- Public schema should not be used for storing the main site data, but the true shared data across all tenants. Table "overriding" via search path is not encouraged.
- Management commands can be run on multiple schemas via wildcards, either sequentially or in parallel using multithreading.
Documentation
https://django-pgschemas.readthedocs.io/
Version 1.0 has several breaking changes from the 0.* series. Please refer to this discussion for details and bug reports.
Contributing
- Join the discussion at https://github.com/lorinkoz/django-pgschemas/discussions.
- PRs are welcome! If you have questions or comments, please use the discussions link above.
- To run the test suite run
make
ormake coverage
. The tests for this project live inside a small django project calledsandbox
.
Credits
- Tom Turner for django-tenants.
- Bernardo Pires for django-tenant-schemas.
- Denish Patel for pg-clone-schema
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_pgschemas-1.0.2.tar.gz
(65.2 kB
view details)
Built Distribution
File details
Details for the file django_pgschemas-1.0.2.tar.gz
.
File metadata
- Download URL: django_pgschemas-1.0.2.tar.gz
- Upload date:
- Size: 65.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da2ef7e451e93468f82c22dd7641d5ab3a6da3e3e8d8c4f572920ac5eb31f757 |
|
MD5 | 1841ba2419edea1c8f73583740072c19 |
|
BLAKE2b-256 | 3648c52bb0f69f56dfb9bb2f6934bccae24088d0b93ab718392c2147d7d006d9 |
File details
Details for the file django_pgschemas-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: django_pgschemas-1.0.2-py3-none-any.whl
- Upload date:
- Size: 72.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c810b50c939eaf05e4f6cee25f99a5ddbb7efd3cf20eb9102549198c57f8d7e1 |
|
MD5 | ee16bcc8e1aed4f3eec6be4495a12651 |
|
BLAKE2b-256 | 3b001adb9af1f7e0c4c2169137cdf27ac146f27fd3e6870443320d54d442f540 |