Opened 10 years ago

Closed 10 years ago

#12693 closed (fixed)

Database routers need error checking on load

Reported by: dhageman Owned by: nobody
Component: Database layer (models, ORM) Version: master
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


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)

django_router_load_check.patch (1.1 KB) - added by dhageman 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by dhageman

comment:1 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(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.

Note: See TracTickets for help on using tickets.
Back to Top