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.1.0.tar.gz
(75.2 kB
view details)
Built Distribution
File details
Details for the file django_pgschemas-1.1.0.tar.gz
.
File metadata
- Download URL: django_pgschemas-1.1.0.tar.gz
- Upload date:
- Size: 75.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
256d961dd6af66d9874eb96f7fbb022797001c1e9f36e431e6ce11912c665b86
|
|
MD5 |
5cf791e09866b6a1216748291ac5235e
|
|
BLAKE2b-256 |
b8df30b5bbbfda3b9aaef7bb352c9c29222a85ace4677c6195c47c6ec623dcc0
|
File details
Details for the file django_pgschemas-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_pgschemas-1.1.0-py3-none-any.whl
- Upload date:
- Size: 84.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
282293f5012f89afd1321123dc45dc7472cd60f3840cc086f40029ae84d5c407
|
|
MD5 |
aba32e1e2d051b6b8f9867a4b1c31354
|
|
BLAKE2b-256 |
0e4608fc209840b191a3cb4130c549706161d96cba1298b80fdefe4a306aeb43
|