function "process_template_response" must return an HttpResponse. The code below returns None.
Error Point : https://github.com/Microsoft/ApplicationInsights-Python/blob/master/applicationinsights/django/middleware.py#L215
Ref django code : https://github.com/django/django/blob/master/django/core/handlers/base.py#L150
Here's what you can change:
def process_template_response(self, request, response):
if hasattr(request, 'appinsights') and hasattr(response, 'template_name'):
data = request.appinsights.request
data.properties['template_name'] = response.template_name
return response # FIX POINT
Thanks.
function "process_template_response" must return an HttpResponse. The code below returns None.
Error Point : https://github.com/Microsoft/ApplicationInsights-Python/blob/master/applicationinsights/django/middleware.py#L215
Ref django code : https://github.com/django/django/blob/master/django/core/handlers/base.py#L150
Here's what you can change:
Thanks.