1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Delayed settings.DATABASE_ROUTERS usage by ConnectionRouter

Refs #20474.
This commit is contained in:
Claude Paroz
2013-05-21 12:21:31 +02:00
parent 2d8c132b18
commit 6a6bb168be
2 changed files with 14 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
import warnings
from django.conf import settings
from django.core import signals
from django.db.utils import (DEFAULT_DB_ALIAS,
DataError, OperationalError, IntegrityError, InternalError,
@@ -14,7 +13,7 @@ __all__ = ('backend', 'connection', 'connections', 'router', 'DatabaseError',
connections = ConnectionHandler()
router = ConnectionRouter(settings.DATABASE_ROUTERS)
router = ConnectionRouter()
# `connection`, `DatabaseError` and `IntegrityError` are convenient aliases
# for backend bits.