firebug can show the content of any request/response, including AJAX
ones. it also renders any HTML content, like those generated by the
Django error pages
--
Javier
You'll have to enable that yourself with some middleware, strangely.
In your app/site, add a "middleware.py":
import logging
logger = logging.getLogger(__name__)
class TracebackLoggingMiddleware(object):
"""Middleware that logs exceptions.
See http://djangosnippets.org/snippets/421/.
To enable it, add
'yourapp.middleware.TracebackLoggingMiddleware' to
your setting.py's MIDDLEWARE_CLASSES.
"""
def process_exception(self, request, exception):
logger.exception(repr(request))
And do the MIDDLEWARE_CLASSES thingy in the docstring.
Reinout
--
Reinout van Rees - rei...@vanrees.org - http://reinout.vanrees.org
Collega's gezocht!
Django/python vacature in Utrecht: http://tinyurl.com/35v34f9
People have already mentioned firebug's ability to show the contents
of the error response. Note that you can also define an
exception middleware that will catch exceptions raised by your views
(but not all exceptions raised in the course of request-response
processing*) occuring during request processing and then you can e.g.
format the error into a json response, say, for less pain on the client
side.
*
(i) the obvious - an apache level error, not all that much django can do
there
(ii) Some exceptions, mostly those raised by the resolver, escape the
exception middleware, just owing to the structure of the code, see
BaseHandler.get_response() [2]. Subclassing the Handler seems to be the
least worst way to deal with that right now.
[2]
http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py