Hi Brennan,

You can force Django to reopen the database connection by:

>>> from django.db import connection
>>> connection.close()

Django will then automatically reconnect to the database when it needs
it. Obviously, it's up to you to figure out where to put this code in
your application (it might be difficult). And, I just realized that I
don't know what happens if the database is down when you call
connection.close(), so you'd have to test it.

 (the code is not multi-db aware, but you can easily adapt that).

  Cheers

    Jirka

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to