Monitoring of active users in Django using Redis
Project description
MONITORING DJANGO ACTIVE USERS
==============================
Monitoring of active users in Django using Redis
Requirements
------------
- Python: 2.7
- Django: 1.6, 1.7
- Django-redis: 4.30
Install
-------
```bash
pip install django-active-users
```
Setup
-----
Your django application should already be setting of Redis cache.
See more in [official documentation](http://niwinz.github.io/django-redis/latest/#_configure_as_cache_backend) of `django-redis`
Add `active_users.middleware.ActiveUsersSessionMiddleware` to your project's `MIDDLEWARE_CLASSES` after the `SessionMiddleware`.
```python
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`
==============================
Monitoring of active users in Django using Redis
Requirements
------------
- Python: 2.7
- Django: 1.6, 1.7
- Django-redis: 4.30
Install
-------
```bash
pip install django-active-users
```
Setup
-----
Your django application should already be setting of Redis cache.
See more in [official documentation](http://niwinz.github.io/django-redis/latest/#_configure_as_cache_backend) of `django-redis`
Add `active_users.middleware.ActiveUsersSessionMiddleware` to your project's `MIDDLEWARE_CLASSES` after the `SessionMiddleware`.
```python
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
Close
Hashes for django-active-users-0.0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef7f4c2100d3ac39b108df839f351e91f33a98aa26b579ff3cf7be7b7b99b760 |
|
MD5 | a4df76d1dfd70b12e61947bb8ff98b04 |
|
BLAKE2b-256 | ef4d6c2a53559b7399504948d67fa445e426520c17178694c0982fe37026eb58 |