mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Thanks to Claude Paroz for the report.
This commit is contained in:
		
				
					committed by
					
						 Carlton Gibson
						Carlton Gibson
					
				
			
			
				
	
			
			
			
						parent
						
							44c24bf028
						
					
				
				
					commit
					89e695a69b
				
			| @@ -32,6 +32,8 @@ class ManagementForm(Form): | ||||
|     as well. | ||||
|     """ | ||||
|  | ||||
|     template_name = "django/forms/div.html"  # RemovedInDjango50Warning. | ||||
|  | ||||
|     TOTAL_FORMS = IntegerField(widget=HiddenInput) | ||||
|     INITIAL_FORMS = IntegerField(widget=HiddenInput) | ||||
|     # MIN_NUM_FORM_COUNT and MAX_NUM_FORM_COUNT are output with the rest of the | ||||
|   | ||||
| @@ -1910,3 +1910,14 @@ class DeprecationTests(SimpleTestCase): | ||||
|             ChoiceFormSet = formset_factory(Choice) | ||||
|             formset = ChoiceFormSet() | ||||
|             str(formset) | ||||
|  | ||||
|     def test_no_management_form_warning(self): | ||||
|         """ | ||||
|         Management forms are already rendered with the new div template. | ||||
|         """ | ||||
|         with isolate_lru_cache(get_default_renderer), self.settings( | ||||
|             FORM_RENDERER="django.forms.renderers.DjangoTemplates" | ||||
|         ): | ||||
|             ChoiceFormSet = formset_factory(Choice, formset=BaseFormSet) | ||||
|             formset = ChoiceFormSet() | ||||
|             str(formset.management_form) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user