Multi-tenancy on Django using PostgreSQL schemas.
Project description
This app uses PostgreSQL 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 simultaneously routed via subdomain and via subfolder on shared subdomain.
Public is no longer the schema for storing the main site data. Public should be used only for true shared data across all tenants. Table “overriding” via search path is no longer encouraged.
Management commands can be run on multiple schemas via wildcards - the multiproc behavior of migrations was extended to just any tenant command.
Documentation
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 or make coverage. The tests for this project live inside a small django project called dpgs_sandbox. Database password and database host can be set through the environment variables DATABASE_PASSWORD and DATABASE_HOST.
Credits
Tom Turner for django-tenants.
Bernardo Pires for django-tenant-schemas.
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
Built Distribution
Hashes for django_pgschemas-0.16.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb72a1d288e29fc569c48367ebaab9c4d51295ffee9f19779658eddd3e48762 |
|
MD5 | 7faa6c093dac857e096e20a93e24e300 |
|
BLAKE2b-256 | 6bbe1f3b03842d80541c499e402aa730dd94289f55b9f3a5dad327656590540a |