django-debug-toolbar-requests icon indicating copy to clipboard operation
django-debug-toolbar-requests copied to clipboard

django-debug-toolbar 1.10+ support

Open yigor opened this issue 7 years ago • 6 comments

Since django-debug-toolbar removed jQuery dependency in version 1.10 javascript had to be rewritten in Vanilla JS and moved into .js file.

yigor avatar Feb 06 '19 19:02 yigor

Hello, @rbas, did you have a chance to take a look?

yigor avatar Feb 13 '19 17:02 yigor

@yigor I have tried this patch and I could not get it working

So far I have found that you need to add this line to MANIFEST.in

recursive-include requests_toolbar/static *

When I click on the requests panel in django toolbar I get error 500 with the following message:

ERROR    django.request.handle_uncaught_exception:118- Internal Server Error: /__debug__/render_panel/
Traceback (most recent call last):
[...]
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: requests_toolbar/panels/requests.html

PabloCastellano avatar Sep 14 '19 13:09 PabloCastellano

@PabloCastellano fixed, thanks!

yigor avatar Sep 16 '19 13:09 yigor

@yigor Is it working for you with the latest versions of django and django-debug-toolbar?

PabloCastellano avatar Sep 16 '19 17:09 PabloCastellano

Just checked it again today and now that django-debug-toolbar 2.0 is out, more changes are needed to make it work with the latest version.

Traceback (most recent call last):
  File "/home/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/lib/python3.6/site-packages/sentry_sdk/integrations/django/middleware.py", line 120, in __call__
    return f(*args, **kwargs)
  File "/home/lib/python3.6/site-packages/sentry_sdk/integrations/django/middleware.py", line 87, in sentry_wrapped_method
    return old_method(*args, **kwargs)
  File "/home/lib/python3.6/site-packages/debug_toolbar/middleware.py", line 69, in __call__
    content_encoding = response.get("Content-Encoding", "")
AttributeError: 'NoneType' object has no attribute 'get'

PabloCastellano avatar Oct 06 '19 21:10 PabloCastellano

Yeah, I've tried it with django 1.11 and django-debug-toolbar 1.11 only.

yigor avatar Oct 07 '19 16:10 yigor