On Tuesday 28 May 2002 12:09 pm, Bobby Kuzma wrote:
> Is there a simple way to execute a particular method when a session
> expires?
>
> Bobby Kuzma
> Senior Software Engineer | Internet Systems Adminstrator
> USA Computer Technologies
> 863.648.4443

I created a Session.py file like so in .../MyApp/Web/Tools/
-----------------------------------------------
from WebKit.Session import Session as _Session

class Session(_Session):

        def expiring(self):
                if not self.isExpired():
                        _Session.expiring(self)
                        # do some stuff
-----------------------------------------------


And in my context's .../MyApp/Web/Pages/__init__.py
-----------------------------------------------
from Tools.Session import Session
app._sessionClass = Session
-----------------------------------------------

I tweaked sys.path in order that the directory containing Web/Tools 
became known.

-Chuck

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to