Skip to content

Instantly share code, notes, and snippets.

Avatar

vinidmpereira

View GitHub Profile
@vinidmpereira
vinidmpereira / example_current_user.py
Last active May 21, 2019
get_current_user middleware.
View example_current_user.py
"""
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()
You can’t perform that action at this time.