Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django-debug-toolbar 1.10+ support #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yigor
Copy link

@yigor yigor commented Feb 6, 2019

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
Copy link
Author

yigor commented Feb 13, 2019

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

@PabloCastellano
Copy link

@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

@yigor
Copy link
Author

yigor commented Sep 16, 2019

@PabloCastellano fixed, thanks!

@PabloCastellano
Copy link

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

@PabloCastellano
Copy link

PabloCastellano commented Oct 6, 2019

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'

@yigor
Copy link
Author

yigor commented Oct 7, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants