Opened 13 years ago
Closed 13 years ago
#17047 closed Bug (fixed)
django.db.utils.load_backend gives confusing error for unqualified db backend name
Reported by: | Carl Meyer | Owned by: | Jonas Obrist |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
If someone upgrades to trunk/1.4, missed the deprecation warnings, and still has e.g. "sqlite3" for a database ENGINE setting, the error message they get is a completely opaque "ImportError: no module named base"
load_backend
goes to some lengths to give a helpful error message in the case of a totally bogus backend, but oddly in the case of a backend that is not fully-qualified but does exist, it bails with the comment "this must be an error in Django itself." That comment/code is just wrong - it would be easy to add a helpful error message for this case.
Attachments (1)
Change History (4)
comment:1 by , 13 years ago
Owner: | changed from | to
---|
by , 13 years ago
Attachment: | 17047.patch added |
---|
comment:2 by , 13 years ago
Easy pickings: | set |
---|---|
Has patch: | set |
patch and tests