I am currently working on a project where I need to implement a multi-tenancy architecture using Django. The goal is to have a single application that can serve multiple clients, each with its own isolated database schema.
Here are the key requirements for the project:
A central database to manage users, client information, and user-client relationships.
Each client should have its own database schema to store their specific data.
When a user logs in, they should be directed to their respective client's database.
We prefer to implement this solution using Django’s native features and best practices.
The multi-tenancy should be achieved without altering domains or subdomains; instead, we plan to use a token to direct users to their respective databases.
Could you please assist me with setting up this multi-tenancy architecture in Django? Any guidance, best practices, or example implementations would be highly appreciated.