# django-tenants/django-tenants

Django tenants using PostgreSQL Schemas

Repository: https://github.com/django-tenants/django-tenants
Canonical: https://ross.abutalabs.com/products/django-tenants
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-24T03:02:52+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 4103, "days_push": 9, "days_rel": 28, "gap_med": 69.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1882, forks 402 (observed 2026-08-28T04:05:48.634119+00:00)

## What it is
A Django app that adds multitenancy support to Django projects using PostgreSQL schemas, so multiple customers can share one application instance and database. Tenants are identified by hostname and routed to their own schema with shared and tenant-specific data support.

## Use cases
- build a multi-tenant SaaS with Django
- serve multiple customers from one Django instance
- isolate tenant data using PostgreSQL schemas
- route requests to tenants by subdomain
- share some data across tenants while keeping tenant-specific tables separate
- avoid running separate database copies per customer

## When to choose
- you use Django with PostgreSQL and need schema-based multitenancy
- you want minimal code changes to support multiple tenants
- you want a balance of isolation and performance with a single database

## When to avoid
- you don't use PostgreSQL
- you need database-per-tenant isolation
- your stack isn't Django

## Facets
- artifact type: library
- maturity: active
- function: middleware, routing, database, orm
- domain: web-development, backend, databases, developer-tools
- platform: python
- tags: django, multitenancy, saas, postgresql-schemas, host-based-tenants, web-server

## Member repositories
- django-tenants/django-tenants (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.634119+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:47.346087+00:00, confidence not recorded.
  - readme: https://github.com/django-tenants/django-tenants (fetched 2026-08-28T04:05:48.634119+00:00, sha 67d92814d3d9)
  - registry_pypi: https://pypi.org/pypi/django-tenants/json (fetched 2026-08-29T10:52:57.208203+00:00, sha 2eee603b53fa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
