Skip to main content

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.

Requirements

  • Django

Installation

  1. Install python library using pip: pip install django-detective

  2. Add detective to INSTALLED_APPS in your Django settings file

  3. Add detective.middleware.TrackingMiddleware to MIDDLEWARE_CLASSES in your Django settings file

  4. Include detective.urls in your urls.py

  5. 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.

Authors

Library is by Erik Telepovsky from Pragmatic Mates. See our other libraries.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-detective-0.4.0.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file django-detective-0.4.0.tar.gz.

File metadata

File hashes

Hashes for django-detective-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eecbcf1d0b089593db43461b4330efd9f1e6be723495b2533cc9793b17fd7dc7
MD5 c51a4633c6dd347172f56bb1858f0337
BLAKE2b-256 d82410cc5f26dd7ebb8c7ec8e1fd087f09e576aafbfc49ef4cbb0e3c3c408a6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page