mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[3.2.x] Fixed #32681 -- Fixed VariableDoesNotExist when rendering some admin template.
Regression in84609b3205. Backport of4e5bbb6ef2from main.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							fc9cbad880
						
					
				
				
					commit
					0dfe88eaba
				
			| @@ -1117,6 +1117,19 @@ class AdminViewBasicTest(AdminViewBasicTestCase): | ||||
|         self.assertContains(response, '<h1>View article</h1>') | ||||
|         self.assertContains(response, '<h2>Article 2</h2>') | ||||
|  | ||||
|     def test_render_views_no_subtitle(self): | ||||
|         tests = [ | ||||
|             reverse('admin:index'), | ||||
|             reverse('admin:app_list', args=('admin_views',)), | ||||
|             reverse('admin:admin_views_article_delete', args=(self.a1.pk,)), | ||||
|             reverse('admin:admin_views_article_history', args=(self.a1.pk,)), | ||||
|         ] | ||||
|         for url in tests: | ||||
|             with self.subTest(url=url): | ||||
|                 with self.assertRaisesMessage(AssertionError, 'no logs'): | ||||
|                     with self.assertLogs('django.template', 'DEBUG'): | ||||
|                         self.client.get(url) | ||||
|  | ||||
|  | ||||
| @override_settings(TEMPLATES=[{ | ||||
|     'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user