Browse Source

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.

Cqoicebordel 10 years ago
parent
commit
bbb5e23551
2 changed files with 4 additions and 2 deletions
  1. 2 2
      searx/templates/oscar/base.html
  2. 2 0
      searx/webapp.py

+ 2 - 2
searx/templates/oscar/base.html

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

+ 2 - 0
searx/webapp.py

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