Chuck wrote:
>That sounds like a bug to me. Can you provide a minimal example that
>recreates it? We'll also need to know version, adapter, etc.
OK, here's a cut-down version of what I'm doing...
Versions: Python 2.2, Webware 0.7, Cheetah 0.9.13a1, using OneShot.cgi on
Apache
The snippets appended below result in a redirect, but the session store is
not cleared. However, if I call the clearSessionStore method directly in
the Cheetah template via $f.clearSessionStore(), things work as expected.
...Edmund.
====================
(1) Cheetah template
#from PageTemplate import PageTemplate
#from WebFormDefinitions import MyForm
#extends PageTemplate
#def main
#compiler useNameMapper = 0
#set $f = MyForm($self.$transaction)
...<stuff>...
$f.processStuff()
#end main
====================
(2) WebFormDefinitions
from Library import BaseForm
class MyForm(BaseForm):
def processStuff(self):
self.clearSessionStore()
self.redirect('http://another.url')
====================
(3) Library
class BaseForm(object):
def __init__(self, transaction):
self.session = transaction.session()
def clearSessionStore(self):
list = self.session.values().copy()
for item in list.keys():
self.session.delValue(item)
def redirect(self, url):
self.response.sendRedirect(url)
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss