Last active
November 25, 2020 18:12
-
-
Save Hassanzadeh-sd/a54580524cf8eeef25bc8b59ff686ed0 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
from datetime import datetime | |
class BaseMiddleware(object): | |
def __init__(self, get_response): | |
self.get_response = get_response | |
def __call__(self, request): | |
return self.get_response(request) | |
class ProcessViewNoneMiddleware(BaseMiddleware): | |
def process_view(self, request, view_func, view_args, view_kwargs): | |
print('----- Middleware view %s' % view_func.__name__) | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment