Groups
Groups
Sign in
Groups
Groups
web.py
Conversations
About
Send feedback
Help
Template for session expired
102 views
Skip to first unread message
ProfessionalIT
unread,
Sep 15, 2012, 9:43:21 AM
9/15/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
is possible personalize the template/output when the session is expired ?
I have this code in my code.py:
web.config.session_parameters['timeout'] = 360
web.config.session_parameters['ignore_expiry'] = False
web.config.session_parameters['expired_message'] = 'Session Expired !, refresh the page !'
when session expires the output is a blank page. How to personalize this ?
thanks
Leandro.
Zhang Huangbin
unread,
Sep 15, 2012, 11:27:49 AM
9/15/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
Here's my code:
# ----
class SessionExpired(web.HTTPError):
def __init__(self, message):
message = web.seeother('/login?msg=SESSION_EXPIRED')
web.HTTPError.__init__(self, '303 See Other', {}, data=message)
web.session.SessionExpired = SessionExpired
# ----
Reply all
Reply to author
Forward
0 new messages