Last active
February 13, 2017 17:06
-
-
Save AliYmn/383731d293768a423501112c8b0abbdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpleMiddleware(object): | |
def __init__(self, get_response): | |
self.get_response = get_response | |
def __call__(self, request): | |
response = self.get_response(request) | |
print('USER: {}'.format(request.user)) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment