- Ensure only one open session per user
- Extends the standard Django database session backend
- Automatically logout previously existing sessions
- Optionally enforce a timeout before allowing a new login
- Works with Django 1.4+
- Add
unique_session
inINSTALLED_APPS
. - Use
SESSION_ENGINE = "unique_session.backends.session_backend"
- (Optional) Add
"UNIQUE_SESSION_BLOCK_TIME = <seconds>"
to enable the timeout. - (Optional) Add
"UNIQUE_SESSION_WHITELIST = (<uid1>, <uid2>,...)"
to whitelist some users (from their numeric id) so that they'll be exempt to the blocking mechanism. - Run syncdb.
GPLv3