Remove whitespace caused by Jinja commands

Adding this conf change will remove every newline created by a Jinja command (`{% %}`). It can save a bit of bandwidth.
This commit is contained in:
Cqoicebordel 2015-02-14 01:42:06 +01:00
parent 3ff269c84c
commit bbb5e23551
2 changed files with 4 additions and 2 deletions

View file

@ -46,7 +46,7 @@
<body> <body>
<div class="container"> <div class="container">
{% include 'oscar/navbar.html' %} {% include 'oscar/navbar.html' %}
{% block site_alert_error %} {% block site_alert_error %}
{% endblock %} {% endblock %}
{% block site_alert_warning %} {% block site_alert_warning %}
@ -62,7 +62,7 @@
{% endblock %} {% endblock %}
{% block site_alert_success %} {% block site_alert_success %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}

View file

@ -81,6 +81,8 @@ app = Flask(
template_folder=templates_path template_folder=templates_path
) )
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.secret_key = settings['server']['secret_key'] app.secret_key = settings['server']['secret_key']
babel = Babel(app) babel = Babel(app)