Skip to content

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

License

Notifications You must be signed in to change notification settings

irtazaakram/django-crum

 
 

Repository files navigation

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.11 (Python 3.5 and 3.6)
  • Django 2.0 (Python 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, 3.8 and 3.9)
  • Django 3.0 (Python 3.6, 3.7, 3.8 and 3.9)
  • Django 3.1 (Python 3.6, 3.7, 3.8 and 3.9)
  • Django 3.2 pre-release (Python 3.6, 3.7, 3.8 and 3.9)
  • Django main/4.0 (Python 3.8 and 3.9)

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.6%
  • Makefile 9.0%
  • HTML 3.4%