This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import arrow #you can use datetime here | |
| from django.contrib import auth | |
| from django.utils import timezone | |
| from django.conf import settings # where I have set FORCE_LOGOUT_IN to 5 | |
| class AutoForceLogoutMiddleware(object): | |
| SESSION_KEY = 'auto-force-logout' | |
| def __init__(self, get_response=None): |
NewerOlder