Middleware¶
The core of django-tenants-url is the custom MIDDLEWARE.
Table of Contents¶
Installation¶
- Add the
TENANT_USER_MODELtosettings.py.
# settings.py
...
DTU_TENANT_USER_MODEL = 'myapp.TenantUser'
...
- Update the
MIDDLEWAREto have the newRequestUUIDTenantMiddleware. Preferentially at the very top.
# settings.py
...
MIDDLEWARE = [
'django_tenants_url.middleware.RequestUUIDTenantMiddleware',
'django.middleware.security.SecurityMiddleware',
...
]
...