Allow creation of new connections by unshared instances of backend.Connectible.

This commit is contained in:
Pavel Zuna
2010-01-05 13:38:20 +01:00
committed by Rob Crittenden
parent 49fb5ad493
commit 314fe71787
2 changed files with 22 additions and 14 deletions

View File

@@ -52,10 +52,10 @@ def destroy_context():
"""
Delete all attributes on thread-local `request.context`.
"""
# need to use .items(), 'cos value.disconnect modifies the dict
for (name, value) in context.__dict__.items():
if isinstance(value, Connection):
value.disconnect()
delattr(context, name)
def ugettext(message):