[Zope] Simple Problem (SESSION)

DA Loeffler David.Loeffler@bristol.ac.uk
Tue, 6 Aug 2002 10:10:25 +0100 (BST)


What Zope version are you using? You will need to have a Browser ID
Manager and a Session Data Manager somewhere in the tree where the DTML
document can acquire them (may as well be the root directory). If they
aren't there, add them, using the default options. You'll also need a
Session Data Container; this is best placed inside the temp_folder
created by default on installation. You'll need to point the session
data manager to the location of the session data container. 

Some or all of this structure is created automatically on installation;
I can't remember precisely how much. Anyway, add in anything that isn't
there, and sessioning should work.

David


On Tue, 6 Aug 2002, Rares Vernica wrote:

> Hi,
> 
> It's not working on my Zope. Could it be something from my zope, what could 
> it be?
> 
> Rares
> 
> 
> >From: DA Loeffler <David.Loeffler@bristol.ac.uk>
> >To: Rares Vernica <verni0@msn.com>
> >CC: zope@zope.org
> >Subject: Re: [Zope] Simple Problem (SESSION)
> >Date: Tue, 6 Aug 2002 09:56:23 +0100 (BST)
> >
> >This seems to work:
> >
> ><dtml-var standard_html_header>
> ><dtml-unless "REQUEST.SESSION.has_key('foo')">
> ><dtml-call "REQUEST.SESSION.set('foo',0)">
> ></dtml-unless>
> ><dtml-call "REQUEST.SESSION.set('foo', REQUEST.SESSION['foo']+1)">
> ><h2><dtml-var title_or_id></h2>
> ><p>
> >You have visited this page <dtml-var "REQUEST.SESSION['foo']"> times.
> ></p>
> ><dtml-var standard_html_footer>
> >
> >(The attributes of SESSION are listed in the API Reference under
> >TransientObject (of which it is an instance). But it behaves more or
> >less as a dictionary.)
> >
> >HTH
> >
> >David
> >
> >
> >On Tue, 6 Aug 2002, Rares Vernica wrote:
> >
> > > Hi,
> > >
> > > How can I make a page, in Zope, that when it is opened in print "1" and
> > > every time the user refresh the page the number increments itself (2, 3,
> > > ...), using SESSION?
> > >
> > > Thanks in advance,
> > > Rares
> > >
> > > _________________________________________________________________
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > >
> > > _______________________________________________
> > > 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 )
> > >
> > >
> 
> 
> 
> 
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
>