mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24128 -- Made admindocs TemplateDetailView respect template_loaders.
Co-Authored-By: Author: Alexander Lazarević <laza@e11bits.com>
This commit is contained in:
committed by
Mariusz Felisiak
parent
1df8983aa3
commit
b7154f811f
8
tests/admin_docs/templates/view_for_loader_test.html
Normal file
8
tests/admin_docs/templates/view_for_loader_test.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Template for Test</title>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
@@ -138,6 +138,12 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
|
||||
html=True,
|
||||
)
|
||||
|
||||
def test_template_detail_loader(self):
|
||||
response = self.client.get(
|
||||
reverse("django-admindocs-templates", args=["view_for_loader_test.html"])
|
||||
)
|
||||
self.assertContains(response, "view_for_loader_test.html</code></li>")
|
||||
|
||||
def test_missing_docutils(self):
|
||||
utils.docutils_is_available = False
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user