django-debug-toolbar icon indicating copy to clipboard operation
django-debug-toolbar copied to clipboard

SQL Panel DeprecationWarning - The "default.html" templates for forms and formsets will be removed

Open bluetech opened this issue 1 year ago • 2 comments

When I open the SQL Panel on Django 4.2, django-debug-toolbar 4.1, I get the following warning:

django.utils.deprecation.RemovedInDjango50Warning: The "default.html" templates for forms and formsets will be removed. These were proxies to the equivalent "table.html" templates, but the new "div.html" templates will be the default from Django 5.0. Transitional renderers are provided to allow you to opt-in to the new output style now. See https://docs.djangoproject.com/en/4.2/releases/4.1/ for more details

I tried to narrow down a bit what's causing it using pdb, but I only managed to see that the self is SignedDataForm, not much more.

bluetech avatar Jul 09 '23 13:07 bluetech

I looked at this awhile back, and AFAICT, the warning is actually generated by an internal compatibility shim in Django. It should go away once the compatibility shim is removed. Although the Debug Toolbar could be updated to avoid the warning, any changes would be unnecessary once targeting Django 5.0. Thus I decided that it wasn't worth code churn on the Debug Toolbar end. If anyone would like more details, let me know, and I can try to gather them together in the next few days.

living180 avatar Jul 10 '23 21:07 living180

Thank you, makes sense. I silenced the warning for now.

bluetech avatar Jul 13 '23 06:07 bluetech