Skip to main content

A Django library to enable semi-isolated multitenancy in your project with users outside the tenant.

Project description

Configuración de Django Multitenant

MULTITENANT_DEFAULT_SCHEMA = 'public' # Esquema predeterminado MULTITENANT_VALIDATION = True # Habilitar validación de acceso al tenant MULTITENANT_SWITCH_METHOD = 'session' # Métodos disponibles: session, subdomain, header

MIDDLEWARE = [ ... 'multitenant.middleware.TenantMiddleware', ... ]

from tenantflow.models import AbstractAccount

class Account(AbstractAccount): """ Extended model for tenant account """ plan = models.CharField(max_length=50, help_text="Plan contratado por el tenant")

from tenantflow.models import AbstractUserAccount

class UserAccount(AbstractUserAccount): """ Relación extendida entre usuarios y tenants con datos adicionales. """ extra_field = models.CharField(max_length=50, help_text="Campo adicional", blank=True)

from tenantflow.models import AbstractUserRole

class UserRole(AbstractUserRole): """ Rol extendido con configuraciones específicas del proyecto. """ additional_config = models.JSONField(blank=True, null=True, help_text="Configuraciones extra")

from tenantflow.models import AbstractUserPrivilege

class UserPrivilege(AbstractUserPrivilege): """ Privilegios extendidos para casos de uso específicos. """ restricted = models.BooleanField(default=False, help_text="Indica si este privilegio está restringido")

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_tenantflow-1.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

django_tenantflow-1.0.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file django_tenantflow-1.0.0.tar.gz.

File metadata

  • Download URL: django_tenantflow-1.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for django_tenantflow-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c916becbd5ad47f6c1f4d132757faf0cfaf800e1504ccb81a19d7034225f5d56
MD5 2bdb8cae38fafcb0ffcdeaf337816174
BLAKE2b-256 18ff55e6b5602bfe7208fcad5a116aba4ef5b73233b968c2d10bad1afa6214d7

See more details on using hashes here.

File details

Details for the file django_tenantflow-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tenantflow-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dfc77c633ab5dbbd90b5a4f8c257f763cbf46eabf27eee752047f93ba9d404d
MD5 78d07002c71231f2d7d5785a45031407
BLAKE2b-256 d6dee266990c25c110e8a29dbc6130b4d6340ee66101789a08341f2e3095c161

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