You cannot store your own classes in the session because the session
is retrieved before your own classes are defined. You can only store
in session primitive types. You can serialize your objects yourself.

On May 8, 7:30 pm, ionel <ionelanton...@gmail.com> wrote:
> Hello,
>
> I'd like to have something like that:
>
> class MyClass():
>    def __init__(self, id)
>        self.id = id
>
> c = MyClass('some_id')
>
> session[c.id] = c
>
> I do not see a solution for this.
> Can somebody help me?
>
> Thanks.
>
> i.

Reply via email to