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.
commitbbb5e23551fd62d2372f96a9d4187cac276eb059
authorCqoicebordel <Cqoicebordel@users.noreply.github.com>
dateSat 14 Feb 2015, 01:42 (12 years ago)
parent3ff269c
searx/templates/oscar/base.html+2−2
@@ -46,7 +46,7 @@
4646<body>
4747 <div class="container">
4848 {% include 'oscar/navbar.html' %}
49−
49+
5050 {% block site_alert_error %}
5151 {% endblock %}
5252 {% block site_alert_warning %}
@@ -62,7 +62,7 @@
6262 {% endblock %}
6363 {% block site_alert_success %}
6464 {% endblock %}
65−
65+
6666 {% block content %}
6767 {% endblock %}
6868
searx/webapp.py+2
@@ -81,6 +81,8 @@ app = Flask(
8181 template_folder=templates_path
8282)
8383
84+app.jinja_env.trim_blocks = True
85+app.jinja_env.lstrip_blocks = True
8486app.secret_key = settings['server']['secret_key']
8587
8688babel = Babel(app)