{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Stores a reference to the currently logged-in request user at the thread level, making it accessible throughout your Django application without passing it as a parameter.","skillfed_tags":["django-middleware","audit-tracking","thread-local"],"use_cases":["Automatically populate created_by and updated_by fields on models without passing user through every layer","Access the current user in model methods, signals, or business logic without threading it through function parameters","Audit logging: track which user performed each database operation without explicit parameter passing","Multi-tenant applications where you need the current user context available globally within a request","Testing: retain user context after request completion for test assertions"],"what_it_does":"django-currentuser is a Django middleware and model field that automatically captures and stores the currently logged-in user at the thread level, making it accessible throughout your request lifecycle without explicitly passing it as a parameter. It provides two main components: a middleware class that captures the user from each request, and a CurrentUserField that automatically populates model fields with the current user when instances are created or updated.\n\nThe package solves the common problem of tracking who created or modified a record without cluttering your views and model methods with user-passing logic. It stores the user reference at the moment a model instance is initialized, allowing you to override it before saving if needed. The middleware is compatible with Django 4.2, 5.2, and 6.0, and supports modern Python versions.","worth_installing":"Yes, if you are using Django 4.2 or later and want to reduce boilerplate for tracking user ownership of records. The package is stable, permissively licensed, and has no known vulnerabilities. The aging maintenance status (205 days since last release) is not a blocker for a mature, narrowly-scoped library, but monitor the repository for Django 6.0+ compatibility as new versions arrive."},"id":"django-currentuser","links":{"html":"https://skillfed.io/packages/django-currentuser","md":"https://skillfed.io/packages/django-currentuser.md","pypi":"https://pypi.org/project/django-currentuser/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2026-01-21","license_spdx":null,"license_treatment":"permissive","name":"django-currentuser","python_support":"supports_current","summary":"Conveniently store reference to request user on thread/db level."},"popularity":{"monthly_downloads":204208,"position":9614,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.10.0"}
