mirror of https://github.com/django/django.git
Fixed #8706 -- Improved the way we detect available database backends.
Thanks, victor@egenix.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
152d517878
commit
238477f90c
|
@ -25,7 +25,8 @@ except ImportError, e:
|
||||||
# listing all possible (built-in) database backends.
|
# listing all possible (built-in) database backends.
|
||||||
backend_dir = os.path.join(__path__[0], 'backends')
|
backend_dir = os.path.join(__path__[0], 'backends')
|
||||||
try:
|
try:
|
||||||
available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.') and not f.endswith('.py') and not f.endswith('.pyc')]
|
available_backends = [f for f in os.listdir(backend_dir)
|
||||||
|
if os.path.isdir(os.path.join(backend_dir, f))]
|
||||||
except EnvironmentError:
|
except EnvironmentError:
|
||||||
available_backends = []
|
available_backends = []
|
||||||
available_backends.sort()
|
available_backends.sort()
|
||||||
|
|
Loading…
Reference in New Issue