I\'m looking for working code and ideas from others who have tried to build a multi-tenant Django application using database-level isolation.
Update/Solution
For the record, I chose to implement a variation of my first idea: issue a USE
in an early request middleware. I also set the CACHE prefix the same way.
I'm using it on a small production site, looking up the tenant name from a Redis database based on the request host. So far, I'm quite happy with the results.
I've turned it into a (hopefully resuable) github project here: https://github.com/mik3y/django-db-multitenant