Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Django middleware to capture current request and user.

Project description

Build Status PyPI Version PyPI License Python Versions Django Versions Read the Docs

Django-CRUM

Django-CRUM (Current Request User Middleware) captures the current request and user in thread local storage.

It enables apps to check permissions, capture audit trails or otherwise access the current request and user without requiring the request object to be passed directly. It also offers a context manager to allow for temporarily impersonating another user.

It provides a signal to extend the built-in function for getting the current user, which could be helpful when using custom authentication methods or user models.

Documentation can be found at RTFD.

It is tested against:
  • Django 1.8 (Python 2.7, 3.4 and 3.5)
  • Django 1.9 (Python 2.7, 3.4 and 3.5)
  • Django 1.10 (Python 2.7, 3.4 and 3.5)
  • Django 1.11 (Python 2.7, 3.4, 3.5 and 3.6)
  • Django 2.0 (Python 3.4, 3.5, 3.6 and 3.7)
  • Django 2.1 (Python 3.5, 3.6 and 3.7)
  • Django 2.2 (Python 3.5, 3.6, 3.7 and 3.8)
  • Django master/3.0 (Python 3.6, 3.7 and 3.8)

Download files

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

Files for django-crum, version 0.7.4
Filename, size File type Python version Upload date Hashes
Filename, size django_crum-0.7.4-py2.py3-none-any.whl (3.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size django-crum-0.7.4.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page