A Django middleware application to timeout a logged in user
session after a specified time period.
A django message will be issued if the session gets timed out.
## Requirements
Make sure the following Django apps and middlewares are enabled:
* Authentication (http://docs.djangoproject.com/en/dev/topics/auth/)
* Sessions (http://docs.djangoproject.com/en/dev/topics/http/sessions/)
* Messages framework (http://docs.djangoproject.com/en/dev/ref/contrib/messages/)
```python
INSTALLED_APPS += (
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.messages',
)
```
```python
MIDDLEWARE_CLASSES += (
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
```
## Installation instructions
Install django-session-idle-timeout
```bash
easy_install django-session-idle-timeout
```
or
```bash
pip install django-session-idle-timeout
```
### Installed apps
```python
INSTALLED_APPS += (
'django-session-idle-timeout',
)
```
### Middleware
```python
MIDDLEWARE_CLASSES += (
'django-session-idle-timeout.middleware.SessionIdleTimeout',
)
```
### Settings
SESSION_IDLE_TIMEOUT defines the period after which the session gets timed out in seconds.
The default value is 30min.
```python
SESSION_IDLE_TIMEOUT = 1800
```
## Keepalive Ping
Keeps the session alive as long as the browser window is opened using a javascript ping.
### Urls
Add to your urls.py e.g.:
```python
urlpatterns += (
url(r'^django-session-idle-timeout/', include('django-session-idle-timeout.urls')),
)
```
### Template
Load the keepalive template tag to start the javascript polling:
```django
{% session_keep_alive %}
{% load session_keep_alive %}
```
## Important
This is a fork of http://github.com/subhranath/django-session-idle-timeout
Metadata
Release files for django-session-idle-timeout 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-session-idle-timeout-1.4.2.tar.gz | 3.5 kB | Without provenance | Details |
Release files / django-session-idle-timeout-1.4.2.tar.gz
| Download URL | django-session-idle-timeout-1.4.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9297c7637309e9f4b132045403b4461ea668b395164f07172cfa286ad6464cb
|
|
BLAKE2b-256 checksum How to use checksums |
bbe6c9a1389a154017cf7f08be6362c7aafb357bafbbc32e33fecbf48ec243aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-session-idle-timeout 1.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.