diff --git a/django/db/utils.py b/django/db/utils.py
index 0ce09ba..9f889ad 100644
|
a
|
b
|
|
| 1 | 1 | import os |
| | 2 | import pkgutil |
| 2 | 3 | from threading import local |
| 3 | 4 | |
| 4 | 5 | from django.conf import settings |
| … |
… |
def load_backend(backend_name):
|
| 28 | 29 | # listing all possible (built-in) database backends. |
| 29 | 30 | backend_dir = os.path.join(os.path.dirname(__file__), 'backends') |
| 30 | 31 | try: |
| 31 | | available_backends = [f for f in os.listdir(backend_dir) |
| 32 | | if os.path.isdir(os.path.join(backend_dir, f)) |
| 33 | | and not f.startswith('.')] |
| | 32 | available_backends = [name for _, name, ispkg in pkgutil.iter_modules([backend_dir]) |
| | 33 | if ispkg] |
| 34 | 34 | except EnvironmentError: |
| 35 | 35 | available_backends = [] |
| 36 | 36 | full_notation = backend_name.startswith('django.db.backends.') |