summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-04-15 09:21:35 -0400
committerGitHub <noreply@github.com>2017-04-15 09:21:35 -0400
commit8c6a3062dda7b51c3f545e625f529ce5c183040d (patch)
tree1d7c79007ec509c79d1ae7177a27e9c0d3cf7760
parent89a080fc0541b3f918abd392982263d5e00d403f (diff)
Fixed #28079 -- Restored "No POST data" (rather than an empty table) in HTML debug page.
Regression in 7b6dccc82fa5b03cf431742c0655e5ac954e228e
-rw-r--r--django/views/debug.py2
-rw-r--r--docs/releases/1.11.1.txt3
-rw-r--r--tests/view_tests/tests/test_debug.py1
3 files changed, 5 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 4d68cd4d26..d32188b346 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -299,7 +299,7 @@ class ExceptionReporter:
'frames': frames,
'request': self.request,
'user_str': user_str,
- 'filtered_POST_items': self.filter.get_post_parameters(self.request).items(),
+ 'filtered_POST_items': list(self.filter.get_post_parameters(self.request).items()),
'settings': get_safe_settings(),
'sys_executable': sys.executable,
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
diff --git a/docs/releases/1.11.1.txt b/docs/releases/1.11.1.txt
index 066127d5e4..e7f2638881 100644
--- a/docs/releases/1.11.1.txt
+++ b/docs/releases/1.11.1.txt
@@ -21,3 +21,6 @@ Bugfixes
* Fixed ``QuerySet.filter()`` crash when it references the name of a
``OneToOneField`` primary key (:ticket:`28047`).
+
+* Fixed empty POST data table appearing instead of "No POST data" in HTML debug
+ page (:ticket:`28079`).
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index b026618b4d..1f01242af9 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -290,6 +290,7 @@ class ExceptionReporterTests(SimpleTestCase):
self.assertIn('<h2>Traceback ', html)
self.assertIn('<h2>Request information</h2>', html)
self.assertNotIn('<p>Request data not supplied</p>', html)
+ self.assertIn('<p>No POST data</p>', html)
def test_no_request(self):
"An exception report can be generated without request"