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('
Request data not supplied
', html) + self.assertIn('No POST data
', html) def test_no_request(self): "An exception report can be generated without request"