On 23/11/10 20:48, Markus Barth wrote:
> I am using quite a lot of asynchronous calls for updating a page. The
> problem is that this way you never see a traceback. In turbogears the
> development server prints all tracebacks to the terminal. Is there any
> way to get a similar behaviour with django?
> 

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to