~petersanchez/django-impersonate#27: 
Using impersonate with an ajax view (returns json)

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)

Status
RESOLVED INVALID
Submitter
bitbucket:gregthe1 na
Assigned to
No-one
Submitted
8 years ago
Updated
3 years ago
Labels
No labels applied.

bitbucket:Peter Sanchez 8 years ago · edit

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.

bitbucket:gregthe1 na 8 years ago · edit

Ah sorry, this was an issue in my code! We were blocking post requests when impersonating and redirecting to another page.

bitbucket:Peter Sanchez 8 years ago · edit

Reporter error.

~petersanchez REPORTED INVALID 3 years ago

Register here or Log in to comment, or comment via email.