On 7/21/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Fri, 2006-07-21 at 15:53 +0800, limodou wrote: > > On 7/21/06, limodou <[EMAIL PROTECTED]> wrote: > > > Recently I wrote some ajax code in my django project. And as I > > > invoking xmlhttprequest to call view methods, and sometimes I see > > > nothing happened in browser, but I found some messages in development > > > server's log output, just like: > > > > > > [21/Jul/2006 08:35:36] "POST /easyadmin/add/users/TPermission/ > > > HTTP/1.1" 500 46557 > > > > > > I saw there is a 500 error, but I cann't see the debug page, so I want > > > to know how to get the errors at this case? Is there an easy way to > > > output the debug to somewhere manually? > > > > > > > Answer myself: > > > > in view method: > > > > try: > > old code > > except: > > import traceback > > traceback.print_exc() > > You could also put something in django/views/debug.py I guess.
But hacking code isnot a good way I think. > > One of my many Django trees contains the beginnings of integrating > Python's logger framework into various places in the code in a > non-intrusive fashion. It's queued behind a few more urgent things at > the moment, but if nobody else gets to it first I'll get this finished > one day and that should help in situations like this. > > Malcolm > good. May be a good thing. -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---