Skip to main content

Multi-tenancy on Django using PostgreSQL schemas.

Project description

Packaging: poetry Code style: black Join the chat at https://gitter.im/django-pgschemas Build status Documentation status Code coverage PyPi version Downloads

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.

Contributing

  • Join the discussion at https://gitter.im/django-pgschemas/community.
  • PRs are welcome! If you have questions or comments, please use the 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-pgschemas, version 0.4.3
Filename, size File type Python version Upload date Hashes
Filename, size django_pgschemas-0.4.3-py3-none-any.whl (37.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-pgschemas-0.4.3.tar.gz (27.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page