{"repo":"CleitonDeLima/django-easy-tenants","free":true,"listed":false,"github":"https://github.com/CleitonDeLima/django-easy-tenants","clone":"git clone https://github.com/CleitonDeLima/django-easy-tenants.git","description":"This is a Django app for managing multiple tenants on the same project instance using a shared approach.","language":"Python","stars":60,"topics":["django","tenant","python"],"license":"MIT","category":"databases-storage","readme_excerpt":"easy-tenants This is a Django app for managing multiple tenants on the same project instance using a shared approach. Background There are typically three solutions for solving the multitenancy problem: 1. Isolated Approach: Separate Databases. Each tenant has it’s own database. 2. Semi Isolated Approach: Shared Database, Separate Schemas. One database for all tenants, but one schema per tenant. 3. Shared Approach: Shared Database, Shared Schema. All tenants share the same database and schema. There is a main tenant-table, where all other tables have a foreign key pointing to. This application implements the third approach, which in our opinion, is the best solution for a large amount of tenants. For more information: Building Multi Tenant Applications with Django Below is a demonstration of the features in each approach for an application with 5000 tenants. Approach Number of DB Number of Schemas Django migration time Public access -------------- ------------ ----------------- --------------------- --------------- Isolated 5000 5000 slow (1/DB) No Semi Isolated 1 5000 slow (1/Schema) Yes Shared 1 1 fast (1) Yes Installation Assuming you have django installed, the first step is to install django-easy-tenants . Now you can import the tenancy module in your Django project. Setup It is recommended to install this app at the beginning of a project. In an existing project, depending on the structure of the models, the data migration can be hard. Add easy tenants to your INSTALLED ","default_branch":null,"files":null,"tree":[],"storefront":"/r/CleitonDeLima","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/CleitonDeLima/django-easy-tenants/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}