durusmail: quixote-users: Where's my cookie?
Where's my cookie?
2004-01-15
Where's my cookie?
Oscar Rambla
2004-01-15
On Wednesday 14 January 2004 18:19, Daniele Varrazzo wrote:
> Hi everbody,
>
> I'm a newbie in Quixote objects model, so I don't know if I'm missing
> something obvious. Sorry about that... anyway:
>
> I wrote a form to manage an object stored into the session: before entering
> the form I read it from a db and pickle in the session; the form always
> work on the session object; on submit the db is updated. Everything works
> fine up there.
>
> My object is a graph, and the previous form only manages some global graph
> properties. In order to edit the graph nodes, I have some links that
> specify (via get) which node they have to work on: I want to read them from
> the session. But when I follow one of these links I found my cookie empty.
>
> Am I doing something wrong? When leaving a form via a a link, is the
> session id automatically preserved (that means something is not working
> properly) or I have to pass it by hand (via get? via http header?)
>
> I am using a subclassed version of Session: it is only stored when new data
> are put into it. Is there something I should be aware when dealing with
> forms? I still don't understand the form tokens methods...
>
> Any help would be really appreciated. Thanks in advance.
>
> Daniele

You must call set_user ( or use form_tokens) in your session in order to
maintain it, otherwise is revoked at each request.
Also, you must supply is_dirty boolean method in your session class.

Take a look at session.py and the last session patch sent recently to this
list for clarification on session cookie.

Fortuna.

Oscar Rambla


reply