Trying to fix AttributeError: 'HttpResponse' object has no attribute '_is_string'