Ver código fonte

add client var to all render pages

Thomas Pointhuber 11 anos atrás
pai
commit
a76525d1f3
1 arquivos alterados com 10 adições e 2 exclusões
  1. 10
    2
      searx/webapp.py

+ 10
- 2
searx/webapp.py Ver arquivo

@@ -225,7 +225,10 @@ def index():
225 225
 @app.route('/about', methods=['GET'])
226 226
 def about():
227 227
     """Render about page"""
228
-    return render('about.html')
228
+    return render(
229
+        'about.html',
230
+        client=settings.get('client', None)
231
+    )
229 232
 
230 233
 
231 234
 @app.route('/autocompleter', methods=['GET', 'POST'])
@@ -320,6 +323,7 @@ def preferences():
320 323
             )
321 324
         return resp
322 325
     return render('preferences.html',
326
+                  client=settings.get('client', None),
323 327
                   locales=settings['locales'],
324 328
                   current_locale=get_locale(),
325 329
                   current_language=lang or 'all',
@@ -334,7 +338,11 @@ def stats():
334 338
     """Render engine statistics page."""
335 339
     global categories
336 340
     stats = get_engines_stats()
337
-    return render('stats.html', stats=stats)
341
+    return render(
342
+        'stats.html',
343
+        stats=stats,
344
+        client=settings.get('client', None)
345
+    )
338 346
 
339 347
 
340 348
 @app.route('/robots.txt', methods=['GET'])