[Zope] working with sessions

Chris McDonough chrism@zope.com
Wed, 26 Jun 2002 16:39:23 -0400


Alejandro:

<dtml-call "SESSION.set('foo', 'bar'")>

or...

<dtml-with SESSION>
<dtml-call "set('foo', 'bar')">
</dtml-with>

Please make sure you understand the difference between:

<dtml-call foo>

and

<dtml-call "foo">

See http://www.zope.org/Documentation/ZopeBook/DTML.stx#2-58 for
examples of this difference.

- C

----- Original Message -----
From: "Alejandro Fernandez" <ale@e-group.org>
To: <zope@zope.org>
Sent: Wednesday, June 26, 2002 1:25 PM
Subject: [Zope] working with sessions


> Hi,
>
> Firstly: for a live site, ie one that's actually going to be used
> commercially, what is best: zsession or the default session
environment
> shown at the end of the "using basic zope objects" chapter of the
zope
> book?
>
> If the second is okay, then where can I find a howto or other docs
that
> might show me how to set a value in a session using dtml? The
reason is I
> don't want to have to do a python script each time I want to set a
> value... I don't know if this reasoning is justified...
>
> I've been trying
>
> <dtml-with SESSION mapping>
> <dtml-call set('banana',1)> (or SESSION.set, without the
dtml-with)
> <dtml-var banana>
>
> But it gives a keyerror. All the examples I've found online and in
the
> shopping cart example or in the zope book are python scripts. Is
there a
> reason for this?
>
> Thanks,
>
> Ale
>
>
>
> --
> Alejandro Fernandez
> Electronic Group Interactive
> --+34-65-232-8086--
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>