Loading django/contrib/admin/views/main.py +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ class ChangeList(object): self.show_full_result_count = self.model_admin.show_full_result_count # Admin actions are shown if there is at least one entry # or if entries are not counted because show_full_result_count is disabled self.show_admin_actions = self.show_full_result_count or bool(full_result_count) self.show_admin_actions = not self.show_full_result_count or bool(full_result_count) self.full_result_count = full_result_count self.result_list = result_list self.can_show_all = can_show_all Loading tests/admin_views/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -2657,6 +2657,7 @@ class AdminSearchTest(TestCase): self.assertContains(response, """<span class="small quiet">1 result (<a href="?">Show all</a>)</span>""", html=True) self.assertTrue(response.context['cl'].show_admin_actions) @override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'], Loading Loading
django/contrib/admin/views/main.py +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ class ChangeList(object): self.show_full_result_count = self.model_admin.show_full_result_count # Admin actions are shown if there is at least one entry # or if entries are not counted because show_full_result_count is disabled self.show_admin_actions = self.show_full_result_count or bool(full_result_count) self.show_admin_actions = not self.show_full_result_count or bool(full_result_count) self.full_result_count = full_result_count self.result_list = result_list self.can_show_all = can_show_all Loading
tests/admin_views/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -2657,6 +2657,7 @@ class AdminSearchTest(TestCase): self.assertContains(response, """<span class="small quiet">1 result (<a href="?">Show all</a>)</span>""", html=True) self.assertTrue(response.context['cl'].show_admin_actions) @override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'], Loading