Is there a good way to get the debug information that Django provides when using jQuery to make Ajax calls? Right now when I make a call, I just see a http/200 server error in the python runserver window, but because the call is made through javascript, I don't get a debug page with all the information.
+2
A:
You can inspect the contents of the response returned to your jQuery ajax call. Using a tool like Firebug can make this pretty easy.
Django will still return the debug page, it's just that it is responding to the ajax call rather than a regular browser request.
It's often a good technique to get your stuff working with regular requests, and then "ajaxify" them only once you are sure the server side code is working.
TM
2009-08-29 17:04:05
What's annoying about that is it's all in unparsed HTML format. I guess I could just load it into a div...
victor
2009-08-29 17:10:21
Actually Firebug can open the returned HTML as a new tab in Firefox, so you can see it in the proper format.
Daniel Roseman
2009-08-29 18:21:20
Ah hah, that'll do it!
victor
2009-08-29 20:45:33
A:
You can use this snippet: http://www.djangosnippets.org/snippets/650/ to get plaintext tracebacks for viewing in firebug, instead of HTML.
Alex Gaynor
2009-08-29 17:14:21
A:
Probably the simplest way is to turn off debug, and rely on email debug messages Django sends. However, this isn't often practical, but it works.
af
2009-08-29 17:28:30