From ce3c80e1c853570c9dd0a4a6cf9791ade2a3b7e6 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 25 Oct 2018 11:45:14 +0100 Subject: [PATCH 1/9] Use defer attribute on all script tags, remove inline JS I'm deploying the experimental `Feature-Policy` on my site. I tried disabling the `sync-script` policy, which blocks HTML-parse-blocking JavaScript, and django-debug-toolbar broke because its script tags aren't async or deferred. There's a bit more information about this feature, and a demo at https://feature-policy-demos.appspot.com/sync-script.html?on I've added `defer` to all the ` +
- + diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 37074a4c6..da7e161a2 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -114,4 +114,4 @@

{% trans "No SQL queries were recorded during this request." %}

{% endif %} - + diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html index c7651e08d..0c6124c41 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html @@ -34,4 +34,4 @@

{% trans "SQL explained" %}

- + diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html index 5a07fee88..8b1f711cf 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html @@ -41,4 +41,4 @@

{% trans "SQL profiled" %}

- + diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html index 75b1a8458..6c3765163 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html @@ -38,4 +38,4 @@

{% trans "SQL selected" %}

- + diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html index 2aa039af4..36c99db82 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/timer.html +++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html @@ -41,4 +41,4 @@

{% trans "Browser timing" %}

- + diff --git a/debug_toolbar/templates/debug_toolbar/redirect.html b/debug_toolbar/templates/debug_toolbar/redirect.html index 365fb482a..761712287 100644 --- a/debug_toolbar/templates/debug_toolbar/redirect.html +++ b/debug_toolbar/templates/debug_toolbar/redirect.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n static %} @@ -9,8 +9,6 @@

{% trans "Location:" %} {{ redi

{% trans "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal." %}

- + From 2c563c01d51c685de508fb49bd0be1d036b483b8 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 25 Oct 2018 15:12:55 +0100 Subject: [PATCH 2/9] changelog note --- docs/changes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index b14335143..93330e04f 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,6 +4,8 @@ Change log UNRELEASED ---------- +* Use ``defer`` on all ``