Django-multitenant

Latest version: v4.1.1

Safety actively analyzes 630130 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

1.1.0

* Add TenantForeignKey to emulate composite foreign keys between tenant related models.

* Split apart library into multiple files. Importing the utility function `get_current_tenant` would cause errors due to the import statement triggering evaluation of the TenantModel class. This would cause problems if TenantModel were evaluated before the database backend was initialized.

* Added a simple TenantOneToOneField which does not try to enforce a uniqueness constraint on the ID column, but preserves all the relationship semantics of using a traditional OneToOneField in Django.

* Overrode Django's DatabaseSchemaEditor to produce foreign key constraints on composite foreign keys consisting of both the ID and tenant ID columns for any foreign key between TenantModels

* Monkey-patched Django's DeleteQuery implementation to include tenant_id in its SQL queries.

1.0.1

* Some bug fixes.

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.