Slide 85
Slide 85 text
各Django
ミドルウェア
class FirstDjangoMiddleware:
def __init__(self, get_response):
print('[django1] one-time configuration')
def __call__(self, request):
print('[django1] before view')
response = self.get_response(request)
print('[django1] after view')
def process_view(self, request, view_func, view_args, view_kwargs):
print('[django1] process view')
def process_template_response(self, request, response):
print('[django1] process template response')