summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2019-02-20 18:30:51 +0200
committerTim Graham <timograham@gmail.com>2019-02-20 11:31:57 -0500
commita9bd914a22df3adfb25141e01b4b409609c0306c (patch)
tree8f01aa3aef1765e626a96edd55830481f97ff28f /django
parent7f25344c2e69454bb69ec6100a1bc0af6cee6d70 (diff)
[2.2.x] Removed an outdated comment on DefaultConnectionProxy.
Backport of 21ff23bfeb4014bceaa3df27677fb68409c0634d from master
Diffstat (limited to 'django')
-rw-r--r--django/db/__init__.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/db/__init__.py b/django/db/__init__.py
index 5708c1c5de..698fb1841b 100644
--- a/django/db/__init__.py
+++ b/django/db/__init__.py
@@ -18,11 +18,6 @@ connections = ConnectionHandler()
router = ConnectionRouter()
-# DatabaseWrapper.__init__() takes a dictionary, not a settings module, so we
-# manually create the dictionary from the settings, passing only the settings
-# that the database backends care about.
-# We load all these up for backwards compatibility, you should use
-# connections['default'] instead.
class DefaultConnectionProxy:
"""
Proxy for accessing the default DatabaseWrapper object's attributes. If you
@@ -42,6 +37,7 @@ class DefaultConnectionProxy:
return connections[DEFAULT_DB_ALIAS] == other
+# For backwards compatibility. Prefer connections['default'] instead.
connection = DefaultConnectionProxy()