On Wed, Sep 30, 2009 at 1:49 PM, Gabriel Rossetti <
[email protected]> wrote:

> > Why can't it be pickled?
>
> Because it has a socket open
>
> > Clearly, since every request is independent,
> > if it really can't be pickled there is no way of passing it from one
> > to the next. Could you store the necessary values to recreate the
> > object?
> >
>
> That is what I currently doing, but the object creation is expensive
> which is why I was looking for another way. So I can't have some sort
> of global dict that would store my objects and the key could be stored
> in the session?
>
>
No.  Consider that your Django app may well be deployed in a multi-process
web server.  Each request can be routed to a different process for
handling.  A socket created in one process won't be accessible from the
other processes.

Karen

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

Reply via email to