浏览代码

add client var to all render pages

Thomas Pointhuber 11 年前
父节点
当前提交
a76525d1f3
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10
    2
      searx/webapp.py

+ 10
- 2
searx/webapp.py 查看文件

225
 @app.route('/about', methods=['GET'])
225
 @app.route('/about', methods=['GET'])
226
 def about():
226
 def about():
227
     """Render about page"""
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
 @app.route('/autocompleter', methods=['GET', 'POST'])
234
 @app.route('/autocompleter', methods=['GET', 'POST'])
320
             )
323
             )
321
         return resp
324
         return resp
322
     return render('preferences.html',
325
     return render('preferences.html',
326
+                  client=settings.get('client', None),
323
                   locales=settings['locales'],
327
                   locales=settings['locales'],
324
                   current_locale=get_locale(),
328
                   current_locale=get_locale(),
325
                   current_language=lang or 'all',
329
                   current_language=lang or 'all',
334
     """Render engine statistics page."""
338
     """Render engine statistics page."""
335
     global categories
339
     global categories
336
     stats = get_engines_stats()
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
 @app.route('/robots.txt', methods=['GET'])
348
 @app.route('/robots.txt', methods=['GET'])