On 7/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:

Nick wrote:
> Martin,

Well, not exactly :-)

Haha, shouldn't post with my eyes closed while waking up.

> You mean if I access the model?

Yes. By the time your response iterator starts working Django has
already closed the database connection used in the request. If you try
to access a model a connection will be automatically opened again but
never closed.

> I tried looking up a close() method for
> the DB api but couldn't find anything.

This is not documented anywhere because this is needed really rare. The
connection can be closed this way:

     from django.db import connection
     connection.close()

Ah. Found that on  google later this day, wasn't sure that was it.
Thanks for confirming it!






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to