diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 7b2b893c10..406e76a974 100644
a
|
b
|
class ModelAdmin(BaseModelAdmin):
|
1536 | 1536 | and return a redirect to the admin index page. |
1537 | 1537 | """ |
1538 | 1538 | msg = _('%(name)s with ID “%(key)s” doesn’t exist. Perhaps it was deleted?') % { |
1539 | | 'name': opts.verbose_name, |
| 1539 | 'name': capfirst(opts.verbose_name), |
1540 | 1540 | 'key': unquote(object_id), |
1541 | 1541 | } |
1542 | 1542 | self.message_user(request, msg, messages.WARNING) |
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 0ba81fde87..3b12f7a633 100644
a
|
b
|
class AdminViewBasicTest(AdminViewBasicTestCase):
|
250 | 250 | self.assertRedirects(response, reverse('admin:index')) |
251 | 251 | self.assertEqual( |
252 | 252 | [m.message for m in response.context['messages']], |
253 | | ['section with ID “abc/<b>” doesn’t exist. Perhaps it was deleted?'] |
| 253 | ['Section with ID “abc/<b>” doesn’t exist. Perhaps it was deleted?'] |
254 | 254 | ) |
255 | 255 | |
256 | 256 | def test_basic_edit_GET_old_url_redirect(self): |
… |
… |
class AdminViewBasicTest(AdminViewBasicTestCase):
|
271 | 271 | self.assertRedirects(response, reverse('admin:index')) |
272 | 272 | self.assertEqual( |
273 | 273 | [m.message for m in response.context['messages']], |
274 | | ['super villain with ID “abc” doesn’t exist. Perhaps it was deleted?'] |
| 274 | ['Super villain with ID “abc” doesn’t exist. Perhaps it was deleted?'] |
275 | 275 | ) |
276 | 276 | |
277 | 277 | def test_basic_add_POST(self): |
… |
… |
class AdminViewPermissionsTest(TestCase):
|
2240 | 2240 | self.assertRedirects(response, reverse('admin:index')) |
2241 | 2241 | self.assertEqual( |
2242 | 2242 | [m.message for m in response.context['messages']], |
2243 | | ['article with ID “nonexistent” doesn’t exist. Perhaps it was deleted?'] |
| 2243 | ['Article with ID “nonexistent” doesn’t exist. Perhaps it was deleted?'] |
2244 | 2244 | ) |
2245 | 2245 | |
2246 | 2246 | def test_history_view(self): |
… |
… |
class AdminViewPermissionsTest(TestCase):
|
2297 | 2297 | self.assertRedirects(response, reverse('admin:index')) |
2298 | 2298 | self.assertEqual( |
2299 | 2299 | [m.message for m in response.context['messages']], |
2300 | | ['article with ID “foo” doesn’t exist. Perhaps it was deleted?'] |
| 2300 | ['Article with ID “foo” doesn’t exist. Perhaps it was deleted?'] |
2301 | 2301 | ) |
2302 | 2302 | |
2303 | 2303 | def test_conditionally_show_add_section_link(self): |
… |
… |
class AdminCustomQuerysetTest(TestCase):
|
3867 | 3867 | self.assertRedirects(response, reverse('admin:index')) |
3868 | 3868 | self.assertEqual( |
3869 | 3869 | [m.message for m in response.context['messages']], |
3870 | | ['empty model with ID “1” doesn’t exist. Perhaps it was deleted?'] |
| 3870 | ['Empty model with ID “1” doesn’t exist. Perhaps it was deleted?'] |
3871 | 3871 | ) |
3872 | 3872 | |
3873 | 3873 | def test_add_model_modeladmin_defer_qs(self): |