Is it worth special-casing this and avoid producing the warning for the
management forms?
--
Ticket URL: <https://code.djangoproject.com/ticket/33876>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: David Smith, Carlton Gibson (added)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Thanks for the report. I think it's worth changing. As far as I'm aware,
it's quite often that management form is the only one that users render
with `{{ form }}`. It should also be quite easy to workaround:
{{{#!diff
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 3adbc6979a..2bea2987be 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -31,6 +31,7 @@ class ManagementForm(Form):
new forms via JavaScript, you should increment the count field of
this form
as well.
"""
+ template_name = "django/forms/div.html" # RemovedInDjango50Warning.
TOTAL_FORMS = IntegerField(widget=HiddenInput)
INITIAL_FORMS = IntegerField(widget=HiddenInput)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:1>
* owner: nobody => Carlton Gibson
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15902 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"89e695a69b16b8c0e720169b3ca4852cfd0c485f" 89e695a]:
{{{
#!CommitTicketReference repository=""
revision="89e695a69b16b8c0e720169b3ca4852cfd0c485f"
Fixed #33876, Refs #32229 -- Made management forms render with div.html
template.
Thanks to Claude Paroz for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:5>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"8aab03ab5550d8da9268eb384bfc7092dd4fab0a" 8aab03a]:
{{{
#!CommitTicketReference repository=""
revision="8aab03ab5550d8da9268eb384bfc7092dd4fab0a"
[4.1.x] Fixed #33876, Refs #32229 -- Made management forms render with
div.html template.
Thanks to Claude Paroz for the report.
Backport of 89e695a69b16b8c0e720169b3ca4852cfd0c485f from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33876#comment:6>