On Sat, 2007-10-27 at 14:39 -0700, RichardH wrote: > > On Oct 27, 11:51 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > On Sat, 2007-10-27 at 08:39 +0000, Daybreaker wrote: > > > I'm developing & administrating a django-powered website. > > > It's still in beta phase, so some errors are found by users. > > > > > I want to make an automatic error reporting system. How can I handle > > > 500 internal server error or exceptions 'somewhere' in my code? > > > > When DEBUG=False, 500 errors (the tracebacks) are automatically emailed > > to everybody in the ADMINS setting. > > > > When DEBUG=True, you will need to override the > > django.views.debug.technical_500_response function. Write your own > > function that takes the same parameters and which sends the mail. It > > should probably call the existing method as its last step so that the > > user sees something. Then, somewhere in your code (e.g. settings.py), > > assign your new function to django.views.debug.technical_500_response > > > > Regards, > > Malcolm > > > > -- > > Monday is an awful way to spend 1/7th of your > > life.http://www.pointy-stick.com/blog/ > > This functionality also interests me. I have had a look through the > Django code but I can't find where the automatic mailing of tracebacks > to ADMINS is handled when DEBUG is set to False. Could you give me a > quick point in the right direction?
http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L127 Regards, Malcolm -- The hardness of butter is directly proportional to the softness of the bread. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

