Skip to content

Instantly share code, notes, and snippets.

@vinidmpereira
vinidmpereira / example_current_user.py
Last active May 21, 2019 18:57
get_current_user middleware.
"""
This should be a separate file, i usually install it on the maind django project folder.
"""
from threading import local
from django.utils.deprecation import MiddlewareMixin
_user = local()