~/talk

A thousand Djangoes within (or Django multi-tenant)

Talkat PyCon India 2020 · 2020-10-02..10-05· [django]
links:none on file
slides:none on file

Defines an active tenant as the runtime context used for queries, URL reversing, cache keys and management commands and shows three concrete database patterns: isolated databases per tenant (one DB alias per tenant, DB routers required), shared database with tenant column (inject tenant filters via managers or defaults, heavy test coverage needed) and Postgres schemas (semi‑isolated, requires custom DB backend, search_path and schema‑aware migrate). Also details middleware routing from domain/session, use of asgiref/threadlocals for async, tenant‑aware cache keys, file storage and Celery tasks and warns migrations and channels need extra work.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:31Why multi-tenancy matters
  3. 3:16What is multi-tenancy?
  4. 6:02Active tenant concept
  5. 8:50Three architectural choices
  6. 9:10Users and tenants relationship
  7. 10:36Database architecture approaches
  8. 12:41Shared database approach
  9. 15:30Semi-isolated database approach
  10. 17:58Choosing the right approach
  11. 18:18Tenant routing in requests
  12. 21:26Framework scope beyond core
  13. 21:47Management commands and files
  14. 24:18Caching and async tasks
  15. 25:01Celery tasks and channels
  16. 26:47Packages and closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.