Monitoring of active users in Django using Redis
Project description
Requirements
Python: 2.7
Django: 1.6, 1.7
Django-redis: 4.30
Install
pip install django-active-users
Setup
Your django application should already be setting of Redis cache. See more in django-redis official documentation.
Add active_users.middleware.ActiveUsersSessionMiddleware to your project’s MIDDLEWARE_CLASSES after the SessionMiddleware:
MIDDLEWARE_CLASSES = (
...
'django.contrib.sessions.middleware.SessionMiddleware',
'active_users.middleware.ActiveUsersSessionMiddleware',
...
)
Settings
ACTIVE_USERS_KEY_EXPIRE - Time of key expire (interval after the last request during which the visitor is considered active) in seconds. Default is 20.
ACTIVE_USERS_EXCLUDE_URL_PATTERNS - A list of regular expressions that will be matched against the request.path_info. If they are matched, the visitor (and pageview) key will not be create.
ACTIVE_USERS_KEY_CLASS - Class of visitor key entry. It should inherited from active_users.keys.AbstractActiveUserEntry. Default active_users.keys.ActiveUserEntry
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-active-users-0.0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af2fcba14f369bbc68790917398e8c6dced7ff8ddedfa34e8699b6ae9f4f70d |
|
MD5 | d1f63eaa06d2d7081035f2b4e599e028 |
|
BLAKE2b-256 | 27f391476ebb0d3d731a71158d44993183390206e8608e2fb3636257fd427ee0 |