Opened 15 years ago

Closed 15 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)

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

Download all attachments as: .zip

Change History (2)

by dhageman, 15 years ago

comment:1 by Russell Keith-Magee, 15 years ago

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