From 0ee9eb5de9e12a9789ce0d1688c26d3b27adfe9c Mon Sep 17 00:00:00 2001
From: Sergey Tereschenko <serg.partizan@gmail.com>
Date: Sat, 3 Jun 2017 19:17:13 +0300
Subject: [PATCH] technical_500_response: utf-8 encoding for AJAX requests
---
django/views/debug.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/django/views/debug.py b/django/views/debug.py
index d3361486cb..5fa412d436 100644
a
|
b
|
def technical_500_response(request, exc_type, exc_value, tb, status_code=500):
|
86 | 86 | reporter = ExceptionReporter(request, exc_type, exc_value, tb) |
87 | 87 | if request.is_ajax(): |
88 | 88 | text = reporter.get_traceback_text() |
89 | | return HttpResponse(text, status=status_code, content_type='text/plain') |
| 89 | return HttpResponse(text, status=status_code, content_type='text/plain; charset=utf-8') |
90 | 90 | else: |
91 | 91 | html = reporter.get_traceback_html() |
92 | 92 | return HttpResponse(html, status=status_code, content_type='text/html') |