So I have a view that returns json but impersonate seems to be wrapping it in HTML (with the impersonate banner, etc).
Is there a way to tell it to leave the output of view alone? (I do want the view to think I'm the impersonate user though)
Not sure what you're saying here. Impersonate does not wrap any HTML in your view responses. That's up to you to place that logic in your templates where you want it. So there is something else wrapping HTML, but it's not django-impersonate.
Ah sorry, this was an issue in my code! We were blocking post requests when impersonating and redirecting to another page.
Reporter error.