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
This commit is contained in:
Simon Willison 2017-12-06 21:58:42 -08:00
commit afbda9e210
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
4 changed files with 4 additions and 0 deletions

View file

@ -3,6 +3,7 @@
{% block title %}{{ database }}{% endblock %}
{% block extra_head %}
{{ super() }}
{% include "_codemirror.html" %}
{% endblock %}

View file

@ -3,6 +3,7 @@
{% block title %}{{ database }}{% if query and query.sql %}{{ query.sql }}{% endif %}{% endblock %}
{% block extra_head %}
{{ super() }}
{% if columns %}
<style>
@media only screen and (max-width: 576px) {

View file

@ -3,6 +3,7 @@
{% block title %}{{ database }}: {{ table }}{% endblock %}
{% block extra_head %}
{{ super() }}
<style>
@media only screen and (max-width: 576px) {
{% for column in columns %}

View file

@ -4,6 +4,7 @@
{% if human_filter_description %}where {{ human_filter_description }}{% endif %}{% endblock %}
{% block extra_head %}
{{ super() }}
<style>
@media only screen and (max-width: 576px) {
{% for column in display_columns %}