5

debug toolbar doesn't show up for views which return HttpResponse() rather than render_to_response().

a view with return HttpResponse()(for test sake) won't show up debug toolbar..

eugene
  • 39,839
  • 68
  • 255
  • 489

2 Answers2

19

The problem is not that you are using HttpResponse, but the content you return when you do so.

From the readme on django debug toolbar‘s github page:

Note: The debug toolbar will only display itself if the mimetype of the response is either text/html or application/xhtml+xml and contains a closing </body> tag.

Alasdair
  • 298,606
  • 55
  • 578
  • 516
  • 1
    +1, it solved my problem last time, I'd like to mention that `` tag has to be part of the rendered template, maybe it'll solve someone's problem in the future – Jan Vorcak Aug 27 '14 at 21:32
0

Though this question is marked as answered , but i want to add that ..

Problems/errors with javascript/jQuery in a page, might so much render the debug tool bar not visible for this certain page/view

Ramez Ashraf
  • 873
  • 6
  • 14