Added DATABASE_ROUTER to the readme quick install docs.
This commit is contained in:
parent
950b66583c
commit
7776c764c9
14
README.rst
14
README.rst
|
@ -113,7 +113,7 @@ Your ``DATABASE_ENGINE`` setting needs to be changed to
|
|||
'ENGINE': 'tenant_schemas.postgresql_backend',
|
||||
# ..
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Add the middleware ``tenant_schemas.middleware.TenantMiddleware`` to the
|
||||
top of ``MIDDLEWARE_CLASSES``, so that each request can be set to use
|
||||
|
@ -125,6 +125,16 @@ the correct schema.
|
|||
'tenant_schemas.middleware.TenantMiddleware',
|
||||
#...
|
||||
)
|
||||
|
||||
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).
|
||||
|
||||
::
|
||||
|
||||
DATABASE_ROUTERS = (
|
||||
'tenant_schemas.routers.TenantSyncRouter',
|
||||
)
|
||||
|
||||
Add ``tenant_schemas`` to your ``INSTALLED_APPS``.
|
||||
|
||||
|
@ -196,4 +206,4 @@ tenant specific apps. Complete instructions can be found at
|
|||
.. |PyPi downloads| image:: https://pypip.in/d/django-tenant-schemas/badge.png
|
||||
:target: https://crate.io/packages/django-tenant-schemas/
|
||||
.. _setup: https://django-tenant-schemas.readthedocs.org/en/latest/install.html
|
||||
.. _django-tenant-schemas.readthedocs.org: https://django-tenant-schemas.readthedocs.org/en/latest/
|
||||
.. _django-tenant-schemas.readthedocs.org: https://django-tenant-schemas.readthedocs.org/en/latest/
|
||||
|
|
Loading…
Reference in New Issue