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.1.tar.gz
(65.2 kB
view details)
Built Distribution
File details
Details for the file django_pgschemas-1.0.1.tar.gz
.
File metadata
- Download URL: django_pgschemas-1.0.1.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 | 5a2c01520c362b11908789d61a6fd252e6978400aa5b2d2306825959854e31fb |
|
MD5 | 23ab64ddb6736736fc7858e18ee24bcf |
|
BLAKE2b-256 | 66fc0aa2c54e9eba2aaa8532887331f036433dad18a2b9299c283c3c15d51c9a |
File details
Details for the file django_pgschemas-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_pgschemas-1.0.1-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 | 9a8def1a3891a185cb41edc88292fa4988047db14a087a8041ecd3725991afd6 |
|
MD5 | 42cadd53daac56b6ece2d9cf96d70633 |
|
BLAKE2b-256 | 5ea1fb970c71f8ddf53279f2d7f3dd9ff591bde6379c7bd3a06779c13b709c5d |