Skip to content

Instantly share code, notes, and snippets.

vinidmpereira

Block or report user

Report or block vinidmpereira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.