1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[5.0.x] Fixed #34911 -- Corrected HTML heading levels on admindocs' main page.

Backport of 21382e2743 from main
This commit is contained in:
laserhyena
2023-10-19 15:48:12 -04:00
committed by Mariusz Felisiak
parent 31bdf67a9c
commit bba963df50
2 changed files with 16 additions and 5 deletions

View File

@@ -7568,6 +7568,17 @@ class AdminDocsTest(TestCase):
response, '<li><a href="#built_in-add">add</a></li>', html=True
)
def test_index_headers(self):
response = self.client.get(reverse("django-admindocs-docroot"))
self.assertContains(response, "<h1>Documentation</h1>")
self.assertContains(response, '<h2><a href="tags/">Tags</a></h2>')
self.assertContains(response, '<h2><a href="filters/">Filters</a></h2>')
self.assertContains(response, '<h2><a href="models/">Models</a></h2>')
self.assertContains(response, '<h2><a href="views/">Views</a></h2>')
self.assertContains(
response, '<h2><a href="bookmarklets/">Bookmarklets</a></h2>'
)
@override_settings(
ROOT_URLCONF="admin_views.urls",