Skip to main content

Multi-tenancy on Django using PostgreSQL schemas.

Project description

Packaging: poetry Code style: black 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.

Documentation

https://django-pgschemas.readthedocs.io/

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

Project details


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-0.15.1.tar.gz (49.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pgschemas-0.15.1-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file django_pgschemas-0.15.1.tar.gz.

File metadata

  • Download URL: django_pgschemas-0.15.1.tar.gz
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for django_pgschemas-0.15.1.tar.gz
Algorithm Hash digest
SHA256 82665201d096338262a6554000d5503299d7e3a3d65793574fd0585f4809e5d2
MD5 f7b566381fada8e9712ad61a44fa581a
BLAKE2b-256 2ce01853c7d047bf1d31e9028a4c1c309dbbb4ec0d546464f27b847255a83c39

See more details on using hashes here.

File details

Details for the file django_pgschemas-0.15.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pgschemas-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90e4545b03f2de62266927c9b4fc6d43235073d46e972c46eb4db831f872ceaf
MD5 a9a86a82b4d74b18846fa3a374f88e2b
BLAKE2b-256 7e783d53ce768b169d8ce3b038d267e471bf7d8ebee1d9ea2a68d221a57ee0bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page