mirror of https://github.com/django/django.git
Changed 'coding error' and 'database error' e-mails to include request.path in subject
git-svn-id: http://code.djangoproject.com/svn/django/trunk@548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9fb3f7fa93
commit
aec0a73d73
|
@ -79,7 +79,7 @@ class BaseHandler:
|
|||
if DEBUG:
|
||||
return self.get_technical_error_response()
|
||||
else:
|
||||
subject = 'Database error (%s IP)' % (request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL')
|
||||
subject = 'Database error (%s IP): %s' % ((request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL'), getattr(request, 'path', ''))
|
||||
message = "%s\n\n%s" % (self._get_traceback(), request)
|
||||
mail_admins(subject, message, fail_silently=True)
|
||||
return self.get_friendly_error_response(request, resolver)
|
||||
|
@ -89,7 +89,7 @@ class BaseHandler:
|
|||
if DEBUG:
|
||||
return self.get_technical_error_response()
|
||||
else:
|
||||
subject = 'Coding error (%s IP)' % (request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL')
|
||||
subject = 'Coding error (%s IP): %s' % ((request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL'), getattr(request, 'path', ''))
|
||||
try:
|
||||
request_repr = repr(request)
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue