Hi All,
I am moving from Pylons 0.9.6.2 to Pylons 0.9.7rc4 and am seeing
strange behavior with the Beaker session. Starting with a fresh
installation (Pylons 0.9.7rc4 with Beaker 1.2.1), I setup this simple
controller:
class HelloworldController(BaseController):
def start_session(self):
import random
session['random_number'] = random.random()
session.save()
return 'random number added to session: %s' % session
['random_number']
def test_session(self):
return str(session.get('random_number'))
def end_session(self):
session.delete()
return 'session deleted'
When you access start_session and test_session everything works as
expected, but end_session does not remove the session from the server
and it also doesn't expire the cookie.
This modified action does work though:
def end_session(self):
session.save()
session.delete()
return 'session deleted'
Am I not understanding something about the way sessions work? Why you
have to save() before calling delete()? Is this a bug?
Thanks,
Andres
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---