Ticket #7472: 7472.patch
File 7472.patch, 1.2 KB (added by , 16 years ago) |
---|
-
django/core/handlers/base.py
124 124 else: 125 125 # When DEBUG is False, send an error message to the admins. 126 126 subject = 'Error (%s IP): %s' % ((request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS and 'internal' or 'EXTERNAL'), request.path) 127 try: 128 request_repr = repr(request) 129 except: 130 request_repr = "Request repr() unavailable" 127 if request.is_secure(): 128 request_repr = "Request omitted because it was made over HTTPS" 129 else: 130 try: 131 request_repr = repr(request) 132 except: 133 request_repr = "Request repr() unavailable" 131 134 message = "%s\n\n%s" % (self._get_traceback(exc_info), request_repr) 132 135 mail_admins(subject, message, fail_silently=True) 133 136 # Return an HttpResponse that displays a friendly error message.