Make django debug page simple when develop ajax page(with firebug)

17 views
Skip to first unread message

kernel1983

unread,
Dec 2, 2008, 11:37:32 PM12/2/08
to Django developers
HTML debug page is good when you develop normal web page

But when you debug ajax based web page with firebug, the HTML debug
page is no good for you.


I did some hack in django/views/debug.py

I remove TECHNICAL_404_TEMPLATE TECHNICAL_500_TEMPLATE html tags and
make it simple.

I think we can have a configure key in settings in the future. The
developers can choose which style of debug page to use, by which type
application they're developing.

alex....@gmail.com

unread,
Dec 2, 2008, 11:42:08 PM12/2/08
to Django developers
Perhaps a better solution would be to vary based on request.is_ajax().

Alex

David Cramer

unread,
Dec 3, 2008, 3:31:57 AM12/3/08
to Django developers
I'll agree 100% that a request.is_ajax() hook to output some
simplified data would be awesome.

On Dec 2, 10:42 pm, "alex.gay...@gmail.com" <alex.gay...@gmail.com>
wrote:

Michael

unread,
Dec 3, 2008, 7:12:33 AM12/3/08
to django-d...@googlegroups.com
I wrote a really simple piece of middleware a while back that does just this: http://www.djangosnippets.org/snippets/650/ . I know I have seen other implementations of the idea around the Web as well. 

I hope that helps, Michael

dc

unread,
Dec 3, 2008, 11:49:13 AM12/3/08
to Django developers
> I think we can have a configure key in settings in the future. The
> developers can choose which style of debug page to use, by which type
> application they're developing.

Have you tried DEBUG_PROPAGATE_EXCEPTIONS [1]?

[1] http://docs.djangoproject.com/en/dev/ref/settings/#debug-propagate-exceptions
Reply all
Reply to author
Forward
0 new messages