RE: [Zope] Session Mgmt. with Session Id Manager
Nice, but not very helpful I found. A simple HowTo would have helped more. We have been using SQLSession for a while and its been working well but we feel there may be issues with Squid and ZEO and many ZEO clients on different boxes. And, se figured since the new Sessioning stuff is built in, maybe now is a good time to switch. So, the questions: Which of the session-type things need to be added where? Data Managers, ID managers, Transient containers?? In SQLSession, I *dtml-call Session* at the top of every page that will use sessions (in standard_header) and then use *dtml-call SESSION.set(name,value)* and *dtml-var SESSION['name']* whenever I want to set or get something from the session. Does anyone have specifics on how to do this simplest of things with the new Sessioning tools? Thanks!!!! -Allen -----Original Message----- From: Geir Bækholt [mailto:geirh@funcom.com] Sent: Wednesday, April 10, 2002 7:22 AM To: Marc Ende Cc: zope@zope.org Subject: Re: [Zope] Session Mgmt. with Session Id Manager The help interface inside Zope actually has nice documentation on sessions.... :-) hth on or about, Wednesday, April 10, 2002, we have reason to believe that Marc Ende wrote something along the lines of : ME> Hi there, ME> I've tried to use Sessions on my zope-site for authentication features... ME> Is there any good documentation about the session data manager and ME> the browser id manager. I've been searching the whole night but I've only ME> found sql - sessionmanager, happy... etc. etc.... But I haven't found a good ME> docu about the included one. (Even the ZopeBook doesn't tell much about ME> sessions) ME> cheers ME> marc -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team _______________________________________________ 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 )
Not a how-to , but a quick summary of something that works at least.. should get you started enough, so the Zope-help will start being useful... the Data-mangers and related items you need should be instantiated by default in Zope2.5 at least, so you dont have to add anything by hand.. i quit using DTML the second ZPT1.0 was out , so i have no examples there , but in ZPT , i list all session contents like this : <div class="debugdata" tal:condition="exists:request/SESSION"> <p><b>SESSION contains:</b></p> <p tal:repeat="keys python:request.SESSION.keys()"><span tal:replace="keys" /> : '<span tal:replace="python:request.SESSION[keys]" />' </p> </div> and usually add stuff to the session in a python script , this way : SESSION = context.REQUEST.SESSION SESSION.set('somekey',somevariable) i am not certain , but i think you have to establish the session by calling: context.browser_id_manager.getBrowserId(create=1) ... that would be just: browser_id_manager.getBrowserId(create=1) in DTML on or about, Wednesday, April 10, 2002, we have reason to believe that Schmidt, Allen J. wrote something along the lines of : SAJ> Nice, but not very helpful I found. A simple HowTo would have helped more. SAJ> We have been using SQLSession for a while and its been working well but we SAJ> feel there may be issues with Squid and ZEO and many ZEO clients on SAJ> different boxes. And, se figured since the new Sessioning stuff is built SAJ> in, maybe now is a good time to switch. SAJ> So, the questions: SAJ> Which of the session-type things need to be added where? Data Managers, ID SAJ> managers, Transient containers?? SAJ> In SQLSession, I *dtml-call Session* at the top of every page that will use SAJ> sessions (in standard_header) and then use *dtml-call SAJ> SESSION.set(name,value)* and *dtml-var SESSION['name']* whenever I want to SAJ> set or get something from the session. SAJ> Does anyone have specifics on how to do this simplest of things with the new SAJ> Sessioning tools? SAJ> Thanks!!!! SAJ> -Allen SAJ> -----Original Message----- SAJ> From: Geir Bækholt [mailto:geirh@funcom.com] SAJ> Sent: Wednesday, April 10, 2002 7:22 AM SAJ> To: Marc Ende SAJ> Cc: zope@zope.org SAJ> Subject: Re: [Zope] Session Mgmt. with Session Id Manager SAJ> The help interface inside Zope actually has nice documentation on SAJ> sessions.... SAJ> :-) SAJ> hth SAJ> on or about, Wednesday, April 10, 2002, we have reason to believe that Marc SAJ> Ende wrote something along the lines of : ME>> Hi there, ME>> I've tried to use Sessions on my zope-site for authentication SAJ> features... ME>> Is there any good documentation about the session data manager and ME>> the browser id manager. I've been searching the whole night but I've SAJ> only ME>> found sql - sessionmanager, happy... etc. etc.... But I haven't found a SAJ> good ME>> docu about the included one. (Even the ZopeBook doesn't tell much about ME>> sessions) ME>> cheers ME>> marc -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team
participants (2)
-
Geir B�kholt -
Schmidt, Allen J.