-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expired session for ajax #110
base: master
Are you sure you want to change the base?
Conversation
added messages.info(request, 'Your session has expired...')
session expired for ajax
@@ -62,7 +64,11 @@ def process_request(self, request): | |||
delta = now - get_last_activity(request.session) | |||
expire_seconds = self.get_expire_seconds(request) | |||
if delta >= timedelta(seconds=expire_seconds): | |||
request._messages._queued_messages = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for ?
logout(request) | ||
if request.is_ajax(): | ||
return defaults.http.HttpResponseForbidden('403 Forbidden: %s' % msg, content_type='text/html') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's that supposed to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If session is expired, a ajax call will get the righ feedback information. That's response.responseText will be '403 Forbidden: %s' % msg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
added isExpired and idleForSeconds
No description provided.