Corrected DATABASE_ROUTERS setting not being displayed correctly as code.
This commit is contained in:
parent
9a9b8a00df
commit
5c6d374572
|
@ -24,10 +24,11 @@ Your ``DATABASE_ENGINE`` setting needs to be changed to
|
|||
|
||||
Add `tenant_schemas.routers.TenantSyncRouter` to your `DATABASE_ROUTERS` setting, so that the correct apps can be synced, depending on what's being synced (shared or tenant).
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
DATABASE_ROUTERS = (
|
||||
'tenant_schemas.routers.TenantSyncRouter',
|
||||
)
|
||||
|
||||
|
||||
Add the middleware ``tenant_schemas.middleware.TenantMiddleware`` to the top of ``MIDDLEWARE_CLASSES``, so that each request can be set to use the correct schema.
|
||||
|
||||
|
|
Loading…
Reference in New Issue