From afbda9e210b6e5eae10a537c121cbb5e92cc8502 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 6 Dec 2017 21:58:42 -0800 Subject: [PATCH] All extra_head blocks now call super This means you can provide a custom base.html template that populates extra_head and any of the default child templates will still render content you included in that block. Refs #158 --- datasette/templates/database.html | 1 + datasette/templates/query.html | 1 + datasette/templates/row.html | 1 + datasette/templates/table.html | 1 + 4 files changed, 4 insertions(+) diff --git a/datasette/templates/database.html b/datasette/templates/database.html index bbab1668..4793743e 100644 --- a/datasette/templates/database.html +++ b/datasette/templates/database.html @@ -3,6 +3,7 @@ {% block title %}{{ database }}{% endblock %} {% block extra_head %} +{{ super() }} {% include "_codemirror.html" %} {% endblock %} diff --git a/datasette/templates/query.html b/datasette/templates/query.html index d8bbba7c..3dce7cfa 100644 --- a/datasette/templates/query.html +++ b/datasette/templates/query.html @@ -3,6 +3,7 @@ {% block title %}{{ database }}{% if query and query.sql %}{{ query.sql }}{% endif %}{% endblock %} {% block extra_head %} +{{ super() }} {% if columns %}