We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a179a4 commit 427b940Copy full SHA for 427b940
pyvecorg/views.py
@@ -20,7 +20,7 @@ def favicon():
20
21
@app.route('/')
22
def index_redirect():
23
- return redirect(url_for('index', lang=detect_lang(request)))
+ return redirect(url_for('index', lang='cs'))
24
25
26
@app.route('/<lang>/')
@@ -33,15 +33,9 @@ def index(lang):
33
34
@app.route('/api.json')
35
def api_redirect():
36
- return redirect(url_for('api', lang=detect_lang(request)))
+ return redirect(url_for('api', lang='cs'))
37
38
39
@app.route('/<lang>/api.json')
40
def api(lang):
41
return jsonify(select_language(data, lang))
42
-
43
44
-def detect_lang(request):
45
- if request.accept_languages.best_match(['en', 'cs', 'sk']) == 'en':
46
- return 'en'
47
- return 'cs'
0 commit comments