recamshak / django-debug-panel

django-debug-toolbar in WebKit DevTools. Works fine with background Ajax requests and non-HTML responses.
BSD 3-Clause "New" or "Revised" License
404 stars 69 forks source link

Doesn't work for Ajax #2

Closed idanz closed 10 years ago

idanz commented 10 years ago

I might be missing something, but it doesn't seem to work for Ajax calls for me. looking at the middleware.py code and I see:

if not toolbar or request.is_ajax() or getattr(response, 'streaming', False):
    return response

so how is that supposed to work for ajax calls?

recamshak commented 10 years ago

Very embarrassing question you are asking here. And you are perfectly right, it's not working with ajax calls.

I fixed the issue and added some tests. Hopefully such stupid mistakes will be unlikely to happen again !

idanz commented 10 years ago

Thanks for the quick fix. Since it makes the package pretty unusable, would it be possible to fix the pip version for this?

recamshak commented 10 years ago

Yes, I updated the package on pypi. A pip install -U django-debug-panel should do it.

idanz commented 10 years ago

Thanks!

On Fri, Dec 13, 2013 at 9:29 AM, Joël Billaud notifications@github.comwrote:

Yes, I updated the package on pypi. A pip install -U django-debug-panelshould do it.

— Reply to this email directly or view it on GitHubhttps://github.com/recamshak/django-debug-panel/issues/2#issuecomment-30491415 .

adityaU commented 10 years ago

Thanks! Works now. Awesome.