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

debug toolbar not showing only when you use Render or HttpResponse function #1596

Closed
yangislet opened this issue Mar 19, 2022 · 2 comments
Closed

Comments

@yangislet
Copy link

yangislet commented Mar 19, 2022

toolbar will show when you login admin , however it will not show when you use Render or HttpResponse function in view function . like class Vue3API(APIView): def get(self, request, **kwargs): """ Return a list of all users. """ books = Book.objects.all() se = BookSerializerPro(books, many=True) # this code will show debug panel return Response(se.data) # this code will not show debug panel #return render(request, "register.html", {"foo": "bar"}) #return HttpResponse(content="tesing".encode())

i use the windows 10 even i have configure the HKEY_CLASSES_ROOT.js in register table !
Django |   | 3.2.10
Python |   | 3.9.1
debug_toolbar | Debug Toolbar | 3.2.4

@tim-schilling
Copy link
Member

tim-schilling commented Mar 19, 2022

The toolbar gets injected into the html response just before the </body> tag. If the response doesn't have that, the toolbar isn't inserted.

@tim-schilling
Copy link
Member

Closing due to lack of response.

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

No branches or pull requests

2 participants