mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #36063 -- Made a FileField navigate to the object admin change page when in list_display_links.
This commit is contained in:
committed by
Sarah Boyce
parent
6a1a9c0ead
commit
a9c79b4629
@@ -1057,6 +1057,16 @@ class ChangeListTests(TestCase):
|
||||
link = reverse("admin:admin_changelist_parent_change", args=(p.pk,))
|
||||
self.assertNotContains(response, '<a href="%s">' % link)
|
||||
|
||||
def test_link_field_display_links(self):
|
||||
self.client.force_login(self.superuser)
|
||||
g = Genre.objects.create(name="Blues", file="documents/blues_history.txt")
|
||||
response = self.client.get(reverse("admin:admin_changelist_genre_changelist"))
|
||||
self.assertContains(
|
||||
response,
|
||||
'<a href="/admin/admin_changelist/genre/%s/change/">'
|
||||
"documents/blues_history.txt</a>" % g.pk,
|
||||
)
|
||||
|
||||
def test_clear_all_filters_link(self):
|
||||
self.client.force_login(self.superuser)
|
||||
url = reverse("admin:auth_user_changelist")
|
||||
|
||||
Reference in New Issue
Block a user