diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 414d1b4..6c76bcb 100644
a
|
b
|
class AdminSite(object):
|
309 | 309 | defaults = { |
310 | 310 | 'current_app': self.name, |
311 | 311 | 'extra_context': extra_context or {}, |
| 312 | 'template_name': self.logout_template or 'admin/logged_out.html' |
312 | 313 | } |
313 | | if self.logout_template is not None: |
314 | | defaults['template_name'] = self.logout_template |
315 | 314 | return logout(request, **defaults) |
316 | 315 | |
317 | 316 | @never_cache |
diff --git a/django/contrib/admin/templates/admin/logged_out.html b/django/contrib/admin/templates/admin/logged_out.html
new file mode 100644
index 0000000..6a18186
-
|
+
|
|
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></div>{% endblock %} |
| 5 | |
| 6 | {% block content %} |
| 7 | |
| 8 | <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> |
| 9 | |
| 10 | <p><a href="{% url 'admin:index' %}">{% trans 'Log in again' %}</a></p> |
| 11 | |
| 12 | {% endblock %} |
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 8e678a7..01cd01f 100644
a
|
b
|
class AdminViewLogoutTest(TestCase):
|
3994 | 3994 | def test_client_logout_url_can_be_used_to_login(self): |
3995 | 3995 | response = self.client.get('/test_admin/admin/logout/') |
3996 | 3996 | self.assertEqual(response.status_code, 200) |
3997 | | self.assertTemplateUsed(response, 'registration/logged_out.html') |
| 3997 | self.assertTemplateUsed(response, 'admin/logged_out.html') |
3998 | 3998 | self.assertEqual(response.request['PATH_INFO'], '/test_admin/admin/logout/') |
3999 | 3999 | |
4000 | 4000 | # we are now logged out |
diff --git a/tests/templates/custom_admin/logout.html b/tests/templates/custom_admin/logout.html
index 3a9301b..bc37a6c 100644
a
|
b
|
|
1 | | {% extends "registration/logged_out.html" %} |
| 1 | {% extends "admin/logged_out.html" %} |
2 | 2 | |
3 | 3 | {% block content %} |
4 | 4 | Hello from a custom logout template |