Django app that tracks all user requests.
Project description
Django app that tracks all user requests and saves following data to database:
user
request method
response status code
IP address
URL path
GET parameters
POST data
session
language code
timezone
content type
user agent
response content (if internal server error occures)
is_secure flag
is_ajax flag
is_debug flag
created and modified timestamps
Tested on Django 1.4.5 and Django 1.8.3
Requirements
Django
Installation
Install python library using pip: pip install django-detective
Add detective to INSTALLED_APPS in your Django settings file
Add detective.middleware.TrackingMiddleware to MIDDLEWARE_CLASSES in your Django settings file
Include detective.urls in your urls.py with detective namespace
Sync your database
Settings
- DETECTIVE_SAVE_RESPONSES
If True, response data will be saved in database. Default: False.
- DETECTIVE_SAVE_ERROR_RESPONSES
If True, internal server error responses with exception (500) are stored in database. Default: True.
- DETECTIVE_TRACK_AJAX_REQUESTS
If False, ajax requests won’t be tracked. Default: True.
- DETECTIVE_TRACK_ANONYMOUS_REQUESTS
If False, anonymous requests won’t be tracked. Default: True.
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
File details
Details for the file django-detective-0.5.0.tar.gz
.
File metadata
- Download URL: django-detective-0.5.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9137c0240e226a5b070d033ef147f4db676d99616b512d3af19ceb4c5720bdf8 |
|
MD5 | c9cefe181c74e0186faafacf1cf669d1 |
|
BLAKE2b-256 | 63ecc9acc63905c69030d82acc6325885cf86f1659019ff2737aea8446051741 |