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--
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 )
Whoops! Change that first one to: <dtml-call "SESSION.set('foo', 'bar')"> ----- Original Message ----- From: "Chris McDonough" <chrism@zope.com> To: "Alejandro Fernandez" <ale@e-group.org>; <zope@zope.org> Sent: Wednesday, June 26, 2002 4:39 PM Subject: Re: [Zope] working with sessions
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 )
_______________________________________________ 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 )
Thanks! That's great... I looked up the page you suggested also. It seems I should really be saying "expr=" too... Now I can set and get variables in sessions. Is there a place with a tutorial on dtml / python programming with sessions (web searches don't reveal any)? Thanks a third time :) Ale On Wed, 26 Jun 2002 16:41:44 -0400 "Chris McDonough" <chrism@zope.com> wrote:
Whoops!
Change that first one to:
<dtml-call "SESSION.set('foo', 'bar')">
----- Original Message ----- From: "Chris McDonough" <chrism@zope.com>
<dtml-call "SESSION.set('foo', 'bar'")>
or...
<dtml-with SESSION> <dtml-call "set('foo', 'bar')"> </dtml-with>
<dtml-with SESSION mapping> <dtml-call set('banana',1)> (or SESSION.set, without the
dtml-with)
<dtml-var banana>
-- Alejandro Fernandez Electronic Group Interactive --+34-65-232-8086--
Alejandro, Just the Zope Book, what exists in the help system, and the Examples folder really. CoreSessionTracking came with a tutorial, but I haven't had time to "port" the tutorial to the Zope 2.5+ sessioning stuff.. sorry. This really bugs me, but there's not much I can do about it at the moment. :-( Thanks, - C Alejandro Fernandez wrote:
Thanks!
That's great... I looked up the page you suggested also. It seems I should really be saying "expr=" too... Now I can set and get variables in sessions. Is there a place with a tutorial on dtml / python programming with sessions (web searches don't reveal any)?
Thanks a third time :)
Ale
On Wed, 26 Jun 2002 16:41:44 -0400 "Chris McDonough" <chrism@zope.com> wrote:
Whoops!
Change that first one to:
<dtml-call "SESSION.set('foo', 'bar')">
----- Original Message ----- From: "Chris McDonough" <chrism@zope.com>
<dtml-call "SESSION.set('foo', 'bar'")>
or...
<dtml-with SESSION> <dtml-call "set('foo', 'bar')"> </dtml-with>
<dtml-with SESSION mapping> <dtml-call set('banana',1)> (or SESSION.set, without the
dtml-with)
<dtml-var banana>
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
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 )
participants (2)
-
Alejandro Fernandez -
Chris McDonough