Opened 16 years ago
Closed 16 years ago
#12693 closed (fixed)
Database routers need error checking on load
| Reported by: | dhageman | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Keywords: | router, multi-db | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
If you attempt to load a database router which can't be found due to path or attribute issues - you will get an internal server error with a trace back that is long and confusing. It essentially points to the fact that "it can't import name connection" at various spots in the django code base. Attached is a patch which adds error checking which is modeled off the error checking in django.contrib.auth.
Attachments (1)
Change History (2)
by , 16 years ago
| Attachment: | django_router_load_check.patch added |
|---|
comment:1 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [12305]) Fixed #12693 -- Improved error handling when there is an error setting up the database router chain. Thanks to dhageman for the report and fix.