I am currently updating the django.db.connections.databases object on the
fly in a FastAPI middleware as detailed here:
https://stackoverflow.com/a/28891429/2324527
After this, Im using a custom database router to select the newly added
database for performing the database operation. Is this method feasible
for production?
If so, do we have a more streamlined approach that could be introduced so
that django supports dynamic database switching on the fly?
--
Ticket URL: <https://code.djangoproject.com/ticket/33578>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Trac is for bug reports only. Please see
TicketClosingReasons/UseSupportChannels
--
Ticket URL: <https://code.djangoproject.com/ticket/33578#comment:1>
Comment (by Mariusz Felisiak):
Creating a new database connection or modifying an existing one on fly is
not supported.
--
Ticket URL: <https://code.djangoproject.com/ticket/33578#comment:2>