mirror of https://github.com/django/django.git
Fixed #34911 -- Corrected HTML heading levels on admindocs' main page.
This commit is contained in:
parent
89d2ae257b
commit
21382e2743
|
@ -14,19 +14,19 @@
|
|||
<h1>{% translate 'Documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
<h3><a href="tags/">{% translate 'Tags' %}</a></h3>
|
||||
<h2><a href="tags/">{% translate 'Tags' %}</a></h2>
|
||||
<p>{% translate 'List of all the template tags and their functions.' %}</p>
|
||||
|
||||
<h3><a href="filters/">{% translate 'Filters' %}</a></h3>
|
||||
<h2><a href="filters/">{% translate 'Filters' %}</a></h2>
|
||||
<p>{% translate 'Filters are actions which can be applied to variables in a template to alter the output.' %}</p>
|
||||
|
||||
<h3><a href="models/">{% translate 'Models' %}</a></h3>
|
||||
<h2><a href="models/">{% translate 'Models' %}</a></h2>
|
||||
<p>{% translate 'Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables' %}.</p>
|
||||
|
||||
<h3><a href="views/">{% translate 'Views' %}</a></h3>
|
||||
<h2><a href="views/">{% translate 'Views' %}</a></h2>
|
||||
<p>{% translate 'Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.' %}</p>
|
||||
|
||||
<h3><a href="bookmarklets/">{% translate 'Bookmarklets' %}</a></h3>
|
||||
<h2><a href="bookmarklets/">{% translate 'Bookmarklets' %}</a></h2>
|
||||
<p>{% translate 'Tools for your browser to quickly access admin functionality.' %}</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7583,6 +7583,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",
|
||||
|
|
Loading…
Reference in New Issue