You are here: Home / LBN / Up2date / Core Linux / BastionLinux 36 / python3-django-currentuser-0.7.0-1.lbn36.noarch

python3-django-currentuser-0.7.0-1.lbn36.noarch

Package Attributes
RPM  python3-django-currentuser-0.7.0-1.lbn36.noarch.rpm Architecture  noarch Size  17642 Created  2024/04/10 09:41:31 UTC
Package Specification
Summary Conveniently store reference to request user on thread/db level.
Group Application/Internet
License ZPL
Home Page https://pypi.org/project/django-currentuser
Description

Conveniently store reference to request user on thread/db level.

Quickstart Differences to django-cuser Release Notes Contributing Reporting issues/improvements Pull Requests Setting up all Python versions Code of Conduct

Quickstart Install django-currentuser: pip install django-currentuser

Add it to the middleware classes in your settings.py: MIDDLEWARE = ( ..., django_currentuser.middleware.ThreadLocalUserMiddleware, )

Then use it in a project: from django_currentuser.middleware import ( get_current_user, get_current_authenticated_user)

from django_currentuser.db.models import CurrentUserField class Foo(models.Model): created_by = CurrentUserField() updated_by = CurrentUserField(on_update=True)

Differences to django-cuser Both libraries serve the same purpose, but be aware of these differences (as of django-cuser v.2017.3.16):

django-currentusers CurrentUserField stores the reference to the request user at initialization of the mod

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(FileDigests)  
Provides
python-django-currentuser
python3-django-currentuser
python3.10-django-currentuser
python3.10dist(django-currentuser)
python3dist(django-currentuser)

Document Actions