Skip to main content
Introduction
============

Provides a simple middleware and API to get hold of the currently
logged-in user.

Usage
=====

Simply add fez.djangothreadlocal.middleware.threadlocals.ThreadLocals
to your MIDDLEWARE_CLASSES in settings.py, for example:

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'fez.djangothreadlocal.middleware.threadlocals.ThreadLocals',
)

You should then be able to get hold of the current logged-in
user (or anonymous user) as follows:

from fez.djangothreadlocal.middleware import threadlocals
user = threadlocals.get_current_user()
Changelog
=========

0.3 - Initial release
---------------------

* Initial release

Metadata

Release files for fez.djangothreadlocal 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fez.djangothreadlocal 0.3
File Size Uploaded
fez.djangothreadlocal-0.3.tar.gz 2.7 kB Details

Release files / fez.djangothreadlocal-0.3.tar.gz

Download URL fez.djangothreadlocal-0.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
78c1cd672633285698ea1b4a1810a1b7be6009fa80f1b07004427ec1d17c3e81
BLAKE2b-256 checksum
How to use checksums
ab8a8455087a4afa77f7b175aa1e77cae7b8dcf7f71cd2c7b909e98326888877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page