Skip to content
Snippets Groups Projects
Commit cde89127 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

update change_lang view function to only change lang if requested

parent d101508e
No related branches found
No related tags found
1 merge request!10Resolve "Example App schreiben"
......@@ -5,7 +5,8 @@ def home():
return render_template('home.html')
def change_lang():
session['language'] = request.args.get('lang')
if request.args.get('lang'):
session['language'] = request.args.get('lang')
print('session language: {0}, request lang {1}'.format(
session['language'], request.args.get('lang')) )
return render_template('change_language.html')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment