Code

Ticket #12661: settings.diff

File settings.diff, 509 bytes (added by kylef, 4 years ago)
Line 
1diff --git a/django/db/__init__.py b/django/db/__init__.py
2index ea353e4..9aba6ff 100644
3--- a/django/db/__init__.py
4+++ b/django/db/__init__.py
5@@ -7,7 +7,7 @@ from django.utils.functional import curry
6 __all__ = ('backend', 'connection', 'connections', 'DatabaseError',
7     'IntegrityError', 'DEFAULT_DB_ALIAS')
8 
9-DEFAULT_DB_ALIAS = 'default'
10+DEFAULT_DB_ALIAS = getattr(settings, 'DEFAULT_DB_ALIAS', 'default')
11 
12 # For backwards compatibility - Port any old database settings over to
13 # the new values.