mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
[multi-db] Added `__str__
` to _default connection singleton.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3cc04ec696
commit
57208f6392
@ -13,7 +13,12 @@ except ImportError:
|
||||
__all__ = ('backend', 'connection', 'DatabaseError')
|
||||
|
||||
# singleton to represent the default connection in connections
|
||||
_default = object()
|
||||
class dummy(object):
|
||||
def __str__(self):
|
||||
return '<default>'
|
||||
_default = dummy()
|
||||
del dummy
|
||||
|
||||
|
||||
# storage for local default connection
|
||||
_local = local()
|
||||
|
Loading…
x
Reference in New Issue
Block a user