id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 15946,Exceptions used for program logic db/utils.py load_backend,sgronblo@…,nobody,"I noticed this problem when trying to figure out why one of my views wouldn't load. The problem there seems to be that it catches both ImportErrors and AttributeErrors in the same catch. I tried modifying the code to explode at when import_module calls __import__ instead but then Django stopped working. This is because of how db/utils.py's load_backend tries to determine if you have used a non-package-prefixed name when specifying your db backend. load_backend does this by blindly prefixing the provded backend name with django.db.backends and then importing it. If the import succeeds Django thinks you used the short name and if it fails Django thinks you specified the prefixed name. It would probably have been better to just check if the module name begins with django.db.backends or not instead of relying on import success/failure?",Bug,closed,"Database layer (models, ORM)",1.2,Normal,fixed,,,Unreviewed,0,0,0,0,0,0