Currently, the core handlers (modpython.py and wsgi.py in
django/core/handlers/) wrap the main request handling in a
try/finally, where the "finally" part closes the database connection.
Obviously, this couples the handler to a database connection, which is
not ideal, because people should be able to use Django without a
database connection.

However, if a person *does* use a database, we still want that
connection.close() in a finally.

Elegant solutions, anybody?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to