Ticket #7337: 7337.diff

File 7337.diff, 1.1 KB (added by Jim Dabell, 11 years ago)
  • django/core/handlers/base.py

     
    123123                return debug.technical_500_response(request, *exc_info)
    124124            else:
    125125                # When DEBUG is False, send an error message to the admins.
     126                import datetime
    126127                subject = 'Error (%s IP): %s' % ((request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS and 'internal' or 'EXTERNAL'), request.path)
    127128                try:
    128129                    request_repr = repr(request)
    129130                except:
    130131                    request_repr = "Request repr() unavailable"
    131                 message = "%s\n\n%s" % (self._get_traceback(exc_info), request_repr)
     132                message = "%s\n\n%s\n\n%s" % (self._get_traceback(exc_info), request_repr, datetime.datetime.now())
    132133                mail_admins(subject, message, fail_silently=True)
    133134                # Return an HttpResponse that displays a friendly error message.
    134135                callback, param_dict = resolver.resolve500()
Back to Top