Skip to content

Commit

Permalink
Fix DeprecationWarnings about form default templates (#1878)
Browse files Browse the repository at this point in the history
Co-authored-by: tschilling <schillingt@better-simple.com>
  • Loading branch information
pfouque and tim-schilling committed Feb 22, 2024
1 parent 9f66bd3 commit b9e4af7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debug_toolbar/templates/debug_toolbar/panels/history.html
@@ -1,6 +1,6 @@
{% load i18n %}{% load static %}
<form method="get" action="{% url 'djdt:history_refresh' %}">
{{ refresh_form }}
{{ refresh_form.as_div }}
<button class="refreshHistory">Refresh</button>
</form>
<table class="djdt-max-height-100">
Expand Down
Expand Up @@ -43,7 +43,7 @@
</td>
<td class="djdt-actions">
<form method="get" action="{% url 'djdt:history_sidebar' %}">
{{ store_context.form }}
{{ store_context.form.as_div }}
<button data-store-id="{{ id }}" class="switchHistory">Switch</button>
</form>
</td>
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/templates/debug_toolbar/panels/sql.html
Expand Up @@ -77,7 +77,7 @@
{% if query.params %}
{% if query.is_select %}
<form method="post">
{{ query.form }}
{{ query.form.as_div }}
<button formaction="{% url 'djdt:sql_select' %}" class="remoteCall">Sel</button>
<button formaction="{% url 'djdt:sql_explain' %}" class="remoteCall">Expl</button>
{% if query.vendor == 'mysql' %}
Expand Down
1 change: 1 addition & 0 deletions docs/changes.rst
Expand Up @@ -9,6 +9,7 @@ Pending
workaround for ``INTERNAL_IPS``.
* Display a better error message when the toolbar's requests
return invalid json.
* Render forms with ``as_div`` to silence Django 5.0 deprecation warnings.

4.3.0 (2024-02-01)
------------------
Expand Down

0 comments on commit b9e4af7

Please sign in to comment.