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

2007-02-02 Thread yacine chaouche
I don't know if this is what you want. If you want to have access, in your code, to the session-timeout-minutes variable, you can try this methode on your session_data_manager object : getTimeoutMinutes(self): Return the number of minutes allowed for subobject inactivity before expiration.

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

2007-02-02 Thread Peter Bengtsson
Thanks but I solved it using:: from App.config import getConfiguration conf = getConfiguration() setattr(MyProductClass, 'SESSION_TIMEOUT_MINUTES', conf.session_timeout_minutes) Now I can use this:: class MyProductClass: def getLoggedInSecurelyMinutesLeft(self): return

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

2007-01-23 Thread Peter Bengtsson
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? My app knows when people log in. I want the app to say You'll be securely logged in for another 25 minutes unless you log

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

2007-01-23 Thread Martijn Pieters
On 1/23/07, Peter Bengtsson [EMAIL PROTECTED] 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

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

2007-01-23 Thread Peter Bengtsson
Martijn Pieters wrote: On 1/23/07, Peter Bengtsson [EMAIL PROTECTED] 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? - Handlers are defined in

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

2007-01-23 Thread Maciej Wisniowski
To get number of zope threads from zope.conf I used this code: from App.config import getConfiguration conf = getConfiguration() print conf.zserver_threads Possibly you'll find session-timeout-minutes there too. BTW. AFAIR session timeout is not a precise value especially if you're using high

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

2007-01-23 Thread Dieter Maurer
Peter Bengtsson wrote at 2007-1-23 13:44 +: 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 value is used to configure the so called Session Data Manager (usually