Hey guys, I'm writing a django project that will require me to route queries to certain large databases based on who the logged in user is.
So all the tables for django.contrib.auth and session and stuff will be in the 'central' database, as well as a table that maps users to which database they need to use for the main app. Can you help me come up with a way of routing database queries this way using a Django database router? At the start of the view could I take the logged in user from request.user or wherever it is, and some how provide that variable to my database router for the rest of the request? All suggestions welcome. Cheers! Tom
signature.asc
Description: OpenPGP digital signature