[Zope] session-timeout-minutes value in runtime Zope

Martijn Pieters mj at zopatista.com
Tue Jan 23 09:07:02 EST 2007


On 1/23/07, Peter Bengtsson <peter at fry-it.com> wrote:
> This might be an FAQ but I wasn't able to find it when searching.
> How do I get access to the value of 'session-timeout-minutes' coming
> from etc/zope.conf in runtime Zope?

The trail to figure this out:

 - ZCML directives for zope.conf are defined in
Zope2/Startup/zopeschema.xml. It defines a 'session_timeout_minutes'
handler.

 - Handlers are defined in Zope2/Startup/handlers.py;
session_timeout_minutes sets the defined value as a environment
variable: ZSESSION_TIMEOUT_MINS

Presumably you can read out this var from os.environ for your own
purposes; note however that I have found no mention of the ZSESSION_
variables outside of handlers.py, they appear to be otherwise unused.

-- 
Martijn Pieters


More information about the Zope mailing list