diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-01 07:12:38 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-01 07:12:38 +0000 |
| commit | 238477f90cb667cbe2656d46ece275ffad6fb216 (patch) | |
| tree | 6413f85a345fe7be931cca6bc33bf3e07f38f556 /django/db/__init__.py | |
| parent | 152d51787802ef6d00297dc070bd2c95d2c2fa17 (diff) | |
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
Diffstat (limited to 'django/db/__init__.py')
| -rw-r--r-- | django/db/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/__init__.py b/django/db/__init__.py index d15fd3238e..8025721e72 100644 --- a/django/db/__init__.py +++ b/django/db/__init__.py @@ -25,7 +25,8 @@ except ImportError, e: # listing all possible (built-in) database backends. backend_dir = os.path.join(__path__[0], 'backends') 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: available_backends = [] available_backends.sort() |
