~/talk

An approach to lightweight tenancy management using Django Rest Framework

Talkat DjangoCon US 2023 · 2023-10-16..10-20· [web-platform, microservices]
links:none on file
slides:none on file

Presents a working lightweight multitenancy approach for shared-schema apps using Django REST Framework with nested URLs via drf nested routers, users allowed in multiple tenants, and a viewset that overrides initial to look up the tenant from the requesting user so unauthorized tenant access returns 404. Adds a company-aware manager that forbids .all and requires a company filter to avoid accidental leaks. Notes it fails for per-tenant schemas and admin access is unchecked, and suggests drf access policy as a richer alternative.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23Multi-tenancy overview
  3. 3:50Lightweight requirements
  4. 5:36Implementation approach
  5. 7:42Custom user viewset
  6. 10:31Model managers for leaks
  7. 15:07Limitations
  8. 16:32DRF Access Policy alternative
  9. 19:22Conclusions
~/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.