Monitoring of active users in Django using Redis
Project description
Requirements
Python: 2.7
Django: 1.6, 1.7
Django-redis: 4.4.4
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
Built Distributions
Hashes for django-active-users-0.0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ca722d6cdb4a6495f633b87e2078738b03e2ea4b5aba54641500d3268c2c6d9 |
|
MD5 | cfb6870c9d72cdd46c1ea928daadfadd |
|
BLAKE2b-256 | 83308cdeeb3b29f39172bd338abd9ebdf8983f0302633f1b7b8a586a2bd50928 |
Hashes for django_active_users-0.0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd03f41968170ae59b217b0de92c5faca529e63016e72c21f7832abcf27153b |
|
MD5 | 9a8b137283b80bc457f3df8f1f82b296 |
|
BLAKE2b-256 | 91ce2a1ad82748d532a9b8621a70c5e58d13420f93aab8306c97090ed1ff86b1 |
Hashes for django_active_users-0.0.1.4-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e526c5b8989d3fde5979b55d30a2c7a439978fc06281ad50e2abee33807776e4 |
|
MD5 | 250971ff4802b4ed52dd8a024d0d26cd |
|
BLAKE2b-256 | dbbdaaca2856751d932ac488cf120f8b6b291be4d3fa3c92c0c14926e4446e2d |