Thursday, April 28, 2011

How do I set Session name with Cherrypy?

In PHP I would do it like this:

session_name("special_session_name");

So how do I do it with Cherrypy? Just need to find exact equivalent for it. PHP manual page: http://fi2.php.net/session_name

From stackoverflow
  • Reading the docs and the source most probably you have to set "tools.sessions.name" in your config file.

    Frank Bannister : Thanks, that seems to be what I was looking for. Here's how to do it in python: cherrypy.config.update({'tools.sessions.name': "special_session_name"})

0 comments:

Post a Comment