add client var to all render pages

This commit is contained in:
Thomas Pointhuber 2014-03-21 12:19:48 +01:00
parent 71c6124f7b
commit a76525d1f3

View file

@ -225,7 +225,10 @@ def index():
@app.route('/about', methods=['GET']) @app.route('/about', methods=['GET'])
def about(): def about():
"""Render about page""" """Render about page"""
return render('about.html') return render(
'about.html',
client=settings.get('client', None)
)
@app.route('/autocompleter', methods=['GET', 'POST']) @app.route('/autocompleter', methods=['GET', 'POST'])
@ -320,6 +323,7 @@ def preferences():
) )
return resp return resp
return render('preferences.html', return render('preferences.html',
client=settings.get('client', None),
locales=settings['locales'], locales=settings['locales'],
current_locale=get_locale(), current_locale=get_locale(),
current_language=lang or 'all', current_language=lang or 'all',
@ -334,7 +338,11 @@ def stats():
"""Render engine statistics page.""" """Render engine statistics page."""
global categories global categories
stats = get_engines_stats() stats = get_engines_stats()
return render('stats.html', stats=stats) return render(
'stats.html',
stats=stats,
client=settings.get('client', None)
)
@app.route('/robots.txt', methods=['GET']) @app.route('/robots.txt', methods=['GET'])