From 4cf82e5bcf87e0d5419d941c2ef7ec8855801319 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 10 May 2014 18:06:25 +0200 Subject: [PATCH] Fixed #21685 -- Displayed app verbose name in admindocs model index --- .../admindocs/templates/admin_doc/model_index.html | 8 ++++---- tests/admin_docs/tests.py | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/django/contrib/admindocs/templates/admin_doc/model_index.html b/django/contrib/admindocs/templates/admin_doc/model_index.html index f48f80dd9f5..4b897c318be 100644 --- a/django/contrib/admindocs/templates/admin_doc/model_index.html +++ b/django/contrib/admindocs/templates/admin_doc/model_index.html @@ -17,12 +17,12 @@

{% trans 'Model documentation' %}

-{% regroup models by app_label as grouped_models %} +{% regroup models by app_config as grouped_models %}
{% for group in grouped_models %}
-

{{ group.grouper|capfirst }}

+

{{ group.grouper.verbose_name }} ({{ group.grouper.name }})

{% for model in group.list %} @@ -42,9 +42,9 @@

{% trans 'Model groups' %}

diff --git a/tests/admin_docs/tests.py b/tests/admin_docs/tests.py index 6eecb6af627..993567bf37b 100644 --- a/tests/admin_docs/tests.py +++ b/tests/admin_docs/tests.py @@ -81,7 +81,11 @@ class AdminDocViewTests(TestCase): def test_model_index(self): response = self.client.get(reverse('django-admindocs-models-index')) - self.assertContains(response, '

Auth

', html=True) + self.assertContains( + response, + '

Authentication and Authorization (django.contrib.auth)

', + html=True + ) def test_template_detail(self): response = self.client.get(reverse('django-admindocs-templates',