#29057: unable to retrive connection from ConnectionHandler in django 2.0
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: nobody
Di Virgilio |
Type: Bug | Status: new
Component: Database | Version: 2.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
please note that this works on django 1.10
{{{
c = ConnectionHandler( {'temp': {'NAME': 'template1', 'ENGINE':
'django.db.backends.postgresql', 'USER': 'rdv', 'HOST': 'localhost',
'PORT': '5432', 'PASSWORD': '', 'OPTIONS': {}, 'READONLY': False,
'BACKUP': False, 'RESTORE': 'release', 'RESTORE_AUTO': True,
'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0,
'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME':
None, 'MIRROR': None}}, 'default': {'NAME': 'rotostampa_db', 'ENGINE':
'django.db.backends.postgresql', 'USER': 'rdv', 'HOST': 'localhost',
'PORT': '5432', 'PASSWORD': '', 'OPTIONS': {}, 'READONLY': False,
'BACKUP': False, 'RESTORE': 'release', 'RESTORE_AUTO': True,
'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0,
'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME':
None, 'MIRROR': None}}})
c['temp'].cursor()
}}}
{{{
raise ConnectionDoesNotExist("The connection %s doesn't exist" % alias)
django.db.utils.ConnectionDoesNotExist: The connection temp doesn't exist
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29057>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.72f226ee4a564db6ea8b7929e34b7d46%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.