on master help sign in
add client var to all render pages
a76525dThomas Pointhuber
searx/webapp.py+10−2
@@ -225,7 +225,10 @@ def index():
225@app.route('/about', methods=['GET'])
225@app.route('/about', methods=['GET'])
226def about():
226def 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,6 +323,7 @@ def preferences():
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,7 +338,11 @@ def stats():
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'])