From 3bf4f1bebb329f0cf6c9dfc34eba819359a2a4d6 Mon Sep 17 00:00:00 2001 From: Pascal F Date: Thu, 8 Feb 2024 13:26:00 +0100 Subject: [PATCH 1/3] Fix form default templates for django 5 --- debug_toolbar/templates/debug_toolbar/panels/history.html | 2 +- debug_toolbar/templates/debug_toolbar/panels/history_tr.html | 2 +- debug_toolbar/templates/debug_toolbar/panels/sql.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debug_toolbar/templates/debug_toolbar/panels/history.html b/debug_toolbar/templates/debug_toolbar/panels/history.html index 84c6cb5bd..0e39a55ce 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history.html @@ -1,6 +1,6 @@ {% load i18n %}{% load static %}
- {{ refresh_form }} + {{ refresh_form.as_table }}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html index 31793472a..756e50e05 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html @@ -43,7 +43,7 @@ diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 6080e9f19..ddfea6feb 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -77,7 +77,7 @@ {% if query.params %} {% if query.is_select %} - {{ query.form }} + {{ query.form.as_table }} {% if query.vendor == 'mysql' %} From d9009e26148928d4570745b5517642138ff97548 Mon Sep 17 00:00:00 2001 From: tschilling Date: Sun, 11 Feb 2024 09:44:16 -0600 Subject: [PATCH 2/3] Use .as_div instead of .as_table --- debug_toolbar/templates/debug_toolbar/panels/history.html | 2 +- debug_toolbar/templates/debug_toolbar/panels/history_tr.html | 2 +- debug_toolbar/templates/debug_toolbar/panels/sql.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debug_toolbar/templates/debug_toolbar/panels/history.html b/debug_toolbar/templates/debug_toolbar/panels/history.html index 0e39a55ce..840f6c9f4 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history.html @@ -1,6 +1,6 @@ {% load i18n %}{% load static %} - {{ refresh_form.as_table }} + {{ refresh_form.as_div }}
- {{ store_context.form }} + {{ store_context.form.as_table }}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html index 756e50e05..eff544f1a 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html +++ b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html @@ -43,7 +43,7 @@ diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index ddfea6feb..e5bf0b7f6 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -77,7 +77,7 @@ {% if query.params %} {% if query.is_select %} - {{ query.form.as_table }} + {{ query.form.as_div }} {% if query.vendor == 'mysql' %} From a31e31fe19484f08d4c281ca9fdf156dff3c029f Mon Sep 17 00:00:00 2001 From: tschilling Date: Sun, 11 Feb 2024 09:45:37 -0600 Subject: [PATCH 3/3] Add a mention to change log. --- docs/changes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index e2a610991..25e61d5ed 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,6 +4,8 @@ Change log Pending ------- +* Render forms with ``as_div`` to silence Django 5.0 deprecation warnings. + 4.3.0 (2024-02-01) ------------------
- {{ store_context.form.as_table }} + {{ store_context.form.as_div }}