Opened 5 years ago
Closed 5 years ago
#31081 closed Bug (duplicate)
print query doesn't work on multiple db environment with no default
Reported by: | haudoing | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 2.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://stackoverflow.com/questions/54643900/cant-see-sql-queries-with-multiple-database-landscape
https://stackoverflow.com/questions/34291259/printing-the-sql-query-in-django-when-using-a-database-router
As the description of both stackoverflow question, the function of print query of queryset object doesn't respect the router and always using default. Thus it raise improperconfigure exception while no default database being set.
Note:
See TracTickets
for help on using tickets.
Duplicate of #25947