Hello,

in the runserver environment, each request is served by the same instance,
so whatever object you create and leave referenced somehow (good luck on
that) will stay alive until runserver is running. However, as soon as you
move to a production environment, be it Apache's mod_python, gunicorn or
whatever, the Python instance that served your first request may be dead by
the time you issue your second one. And it gots worse when you begin to
scale your application to multiple machines.

Why is that object not serializable? Is there really no way to make it so,
or store it's data to either the session, on the disk or to a key-value
store like Redis?

Best,
Gergely
On 21 Oct 2015 01:30, "Serena" <serenity.l...@gmail.com> wrote:

> sorry, typo.
>
> Regards.
>
> I need to create an object when a user connects to the system. and the
> object must be kept alive until the user disconnects. This object is unique
> for each user connected to the system.
>
> This object can not be serialized and changes its state throughout his
> life.
>
> This object should be visible only from django, ie, only the server side.
>
> I have read and all I've found is serialized and stored in section. but.
> thus, it does not work for me.
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/816b2c09-9724-436a-89f9-6b200b1430cb%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/816b2c09-9724-436a-89f9-6b200b1430cb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBUJrpCkDCkcgevBjLvyjxfNOG-24Q7a-3gA6YG9iY%2BqK0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to