Skip to main content

Simple logging of user access to URLs in Django.

Project description

django-view-tracking

Simple logging of user access to URLs in Django.

Usage

Install:

pip install django-view-tracking

Enable:

# settings.py

INSTALLED_APPS = [
    ...
    'django_view_tracking',
    ...
]

MIDDLEWARE = [
    ...
    'django_view_tracking.middleware.ViewTrackingMiddleware',
    ...
]

Configure:

# global kill switch
DJANGO_VIEW_TRACKING_ENABLED = True

# switch logging for anonymous users on or off
DJANGO_VIEW_TRACKING_ANONYMOUS_USER = True

# ignore logging for specific paths
DJANGO_VIEW_TRACKING_BLACKLIST = [
    reverse('admin:index'),
]

Migrate:

python manage.py migrate

Enjoy:

View logs in the Django Admin under Django View Tracking.

License

MIT License

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-view-tracking-0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_view_tracking-0.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file django-view-tracking-0.2.tar.gz.

File metadata

  • Download URL: django-view-tracking-0.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for django-view-tracking-0.2.tar.gz
Algorithm Hash digest
SHA256 1b4300cf580eafb9d10f607aef8b92ff8d13e821fbf6aa751912b384f77c1ec4
MD5 3ff8bd0ca34939cfae04c28e5b19b49f
BLAKE2b-256 86aee408d28060017ea6ceba691d5e0dae309d1fa4489b805dca51d579c34c52

See more details on using hashes here.

File details

Details for the file django_view_tracking-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_view_tracking-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec5736c057120a6541c20bf279c88f72cb6aa595290d95b284a8ae265b72cf1d
MD5 1c6d6e47e3a86c09c0a9ce0dc48bb105
BLAKE2b-256 15a4a9c88624d48b34af4c2f5b2120d4025b11e55a674533779ab7a55ffee6dd

See more details on using hashes here.

Supported by

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