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/
Contributing
See CONTRIBUTING.md for details on how to contribute to this project.
Credits
- Tom Turner for django-tenants.
- Bernardo Pires for django-tenant-schemas.
- Denish Patel for pg-clone-schema