{"action":"created","comment":{"url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/comments/209193053","pull_request_review_id":145159054,"id":209193053,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTE5MzA1Mw==","diff_hunk":"@@ -11,23 +11,37 @@\n data = load_data()\n \n \n-@app.route('/')\n-def index_redirect():\n-    if request.accept_languages.best_match(['en', 'cs', 'sk']) == 'en':\n-        return redirect(url_for('index', lang='en'))\n-    return redirect(url_for('index', lang='cs'))\n-\n-\n @app.route('/favicon.ico')\n def favicon():\n     static = os.path.join(app.root_path, 'static')\n     return send_from_directory(static, 'favicon.ico',\n                                mimetype='image/vnd.microsoft.icon')\n \n \n+@app.route('/')\n+def index_redirect():\n+    return redirect(url_for('index', lang=detect_lang(request)))\n+\n+\n @app.route('/<lang>/')\n def index(lang):\n     context = select_language(data, lang)\n     context['lang'] = lang\n     context['now'] = datetime.now()\n     return render_template('index.html', **context)\n+\n+\n+@app.route('/api.json')\n+def api_redirect():\n+    return redirect(url_for('api', lang=detect_lang(request)))","path":"pyvecorg/views.py","position":42,"original_position":42,"commit_id":"fe790aaccdee09328ec71f950325b3b2edf85d4e","original_commit_id":"fe790aaccdee09328ec71f950325b3b2edf85d4e","user":{"login":"hroncok","id":2401856,"node_id":"MDQ6VXNlcjI0MDE4NTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2401856?v=4","gravatar_id":"","url":"https://api.github.com/users/hroncok","html_url":"https://github.com/hroncok","followers_url":"https://api.github.com/users/hroncok/followers","following_url":"https://api.github.com/users/hroncok/following{/other_user}","gists_url":"https://api.github.com/users/hroncok/gists{/gist_id}","starred_url":"https://api.github.com/users/hroncok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hroncok/subscriptions","organizations_url":"https://api.github.com/users/hroncok/orgs","repos_url":"https://api.github.com/users/hroncok/repos","events_url":"https://api.github.com/users/hroncok/events{/privacy}","received_events_url":"https://api.github.com/users/hroncok/received_events","type":"User","site_admin":false},"body":"Good catch. :)","created_at":"2018-08-10T09:00:10Z","updated_at":"2018-08-10T09:00:10Z","html_url":"https://github.com/pyvec/pyvec.org/pull/34#discussion_r209193053","pull_request_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/comments/209193053"},"html":{"href":"https://github.com/pyvec/pyvec.org/pull/34#discussion_r209193053"},"pull_request":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34"}},"in_reply_to_id":209192374},"pull_request":{"url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34","id":207128471,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTI4NDcx","html_url":"https://github.com/pyvec/pyvec.org/pull/34","diff_url":"https://github.com/pyvec/pyvec.org/pull/34.diff","patch_url":"https://github.com/pyvec/pyvec.org/pull/34.patch","issue_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/34","number":34,"state":"open","locked":false,"title":"Add dead simple API","user":{"login":"honzajavorek","id":283441,"node_id":"MDQ6VXNlcjI4MzQ0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/283441?v=4","gravatar_id":"","url":"https://api.github.com/users/honzajavorek","html_url":"https://github.com/honzajavorek","followers_url":"https://api.github.com/users/honzajavorek/followers","following_url":"https://api.github.com/users/honzajavorek/following{/other_user}","gists_url":"https://api.github.com/users/honzajavorek/gists{/gist_id}","starred_url":"https://api.github.com/users/honzajavorek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honzajavorek/subscriptions","organizations_url":"https://api.github.com/users/honzajavorek/orgs","repos_url":"https://api.github.com/users/honzajavorek/repos","events_url":"https://api.github.com/users/honzajavorek/events{/privacy}","received_events_url":"https://api.github.com/users/honzajavorek/received_events","type":"User","site_admin":false},"body":"Příprava na https://github.com/pyvec/guide/issues/11#issuecomment-411534372","created_at":"2018-08-08T20:30:20Z","updated_at":"2018-08-10T09:00:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aff25b2335236e9c7ac0d1fae187597abdb014b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34/commits","review_comments_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34/comments","review_comment_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/34/comments","statuses_url":"https://api.github.com/repos/pyvec/pyvec.org/statuses/fe790aaccdee09328ec71f950325b3b2edf85d4e","head":{"label":"pyvec:honzajavorek/api","ref":"honzajavorek/api","sha":"fe790aaccdee09328ec71f950325b3b2edf85d4e","user":{"login":"pyvec","id":791768,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTc2OA==","avatar_url":"https://avatars1.githubusercontent.com/u/791768?v=4","gravatar_id":"","url":"https://api.github.com/users/pyvec","html_url":"https://github.com/pyvec","followers_url":"https://api.github.com/users/pyvec/followers","following_url":"https://api.github.com/users/pyvec/following{/other_user}","gists_url":"https://api.github.com/users/pyvec/gists{/gist_id}","starred_url":"https://api.github.com/users/pyvec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyvec/subscriptions","organizations_url":"https://api.github.com/users/pyvec/orgs","repos_url":"https://api.github.com/users/pyvec/repos","events_url":"https://api.github.com/users/pyvec/events{/privacy}","received_events_url":"https://api.github.com/users/pyvec/received_events","type":"Organization","site_admin":false},"repo":{"id":1836444,"node_id":"MDEwOlJlcG9zaXRvcnkxODM2NDQ0","name":"pyvec.org","full_name":"pyvec/pyvec.org","owner":{"login":"pyvec","id":791768,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTc2OA==","avatar_url":"https://avatars1.githubusercontent.com/u/791768?v=4","gravatar_id":"","url":"https://api.github.com/users/pyvec","html_url":"https://github.com/pyvec","followers_url":"https://api.github.com/users/pyvec/followers","following_url":"https://api.github.com/users/pyvec/following{/other_user}","gists_url":"https://api.github.com/users/pyvec/gists{/gist_id}","starred_url":"https://api.github.com/users/pyvec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyvec/subscriptions","organizations_url":"https://api.github.com/users/pyvec/orgs","repos_url":"https://api.github.com/users/pyvec/repos","events_url":"https://api.github.com/users/pyvec/events{/privacy}","received_events_url":"https://api.github.com/users/pyvec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyvec/pyvec.org","description":"Website of Pyvec nonprofit / Webová stránka neziskovky Pyvec","fork":false,"url":"https://api.github.com/repos/pyvec/pyvec.org","forks_url":"https://api.github.com/repos/pyvec/pyvec.org/forks","keys_url":"https://api.github.com/repos/pyvec/pyvec.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyvec/pyvec.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyvec/pyvec.org/teams","hooks_url":"https://api.github.com/repos/pyvec/pyvec.org/hooks","issue_events_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/events{/number}","events_url":"https://api.github.com/repos/pyvec/pyvec.org/events","assignees_url":"https://api.github.com/repos/pyvec/pyvec.org/assignees{/user}","branches_url":"https://api.github.com/repos/pyvec/pyvec.org/branches{/branch}","tags_url":"https://api.github.com/repos/pyvec/pyvec.org/tags","blobs_url":"https://api.github.com/repos/pyvec/pyvec.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyvec/pyvec.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyvec/pyvec.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyvec/pyvec.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyvec/pyvec.org/statuses/{sha}","languages_url":"https://api.github.com/repos/pyvec/pyvec.org/languages","stargazers_url":"https://api.github.com/repos/pyvec/pyvec.org/stargazers","contributors_url":"https://api.github.com/repos/pyvec/pyvec.org/contributors","subscribers_url":"https://api.github.com/repos/pyvec/pyvec.org/subscribers","subscription_url":"https://api.github.com/repos/pyvec/pyvec.org/subscription","commits_url":"https://api.github.com/repos/pyvec/pyvec.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyvec/pyvec.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyvec/pyvec.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyvec/pyvec.org/contents/{+path}","compare_url":"https://api.github.com/repos/pyvec/pyvec.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyvec/pyvec.org/merges","archive_url":"https://api.github.com/repos/pyvec/pyvec.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyvec/pyvec.org/downloads","issues_url":"https://api.github.com/repos/pyvec/pyvec.org/issues{/number}","pulls_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls{/number}","milestones_url":"https://api.github.com/repos/pyvec/pyvec.org/milestones{/number}","notifications_url":"https://api.github.com/repos/pyvec/pyvec.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyvec/pyvec.org/labels{/name}","releases_url":"https://api.github.com/repos/pyvec/pyvec.org/releases{/id}","deployments_url":"https://api.github.com/repos/pyvec/pyvec.org/deployments","created_at":"2011-06-02T09:52:26Z","updated_at":"2018-06-06T16:51:24Z","pushed_at":"2018-08-09T17:06:14Z","git_url":"git://github.com/pyvec/pyvec.org.git","ssh_url":"git@github.com:pyvec/pyvec.org.git","clone_url":"https://github.com/pyvec/pyvec.org.git","svn_url":"https://github.com/pyvec/pyvec.org","homepage":"http://pyvec.org","size":13942,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"pyvec:master","ref":"master","sha":"59a0ba42f49c8671b4d33cd48e987abda22f88af","user":{"login":"pyvec","id":791768,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTc2OA==","avatar_url":"https://avatars1.githubusercontent.com/u/791768?v=4","gravatar_id":"","url":"https://api.github.com/users/pyvec","html_url":"https://github.com/pyvec","followers_url":"https://api.github.com/users/pyvec/followers","following_url":"https://api.github.com/users/pyvec/following{/other_user}","gists_url":"https://api.github.com/users/pyvec/gists{/gist_id}","starred_url":"https://api.github.com/users/pyvec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyvec/subscriptions","organizations_url":"https://api.github.com/users/pyvec/orgs","repos_url":"https://api.github.com/users/pyvec/repos","events_url":"https://api.github.com/users/pyvec/events{/privacy}","received_events_url":"https://api.github.com/users/pyvec/received_events","type":"Organization","site_admin":false},"repo":{"id":1836444,"node_id":"MDEwOlJlcG9zaXRvcnkxODM2NDQ0","name":"pyvec.org","full_name":"pyvec/pyvec.org","owner":{"login":"pyvec","id":791768,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTc2OA==","avatar_url":"https://avatars1.githubusercontent.com/u/791768?v=4","gravatar_id":"","url":"https://api.github.com/users/pyvec","html_url":"https://github.com/pyvec","followers_url":"https://api.github.com/users/pyvec/followers","following_url":"https://api.github.com/users/pyvec/following{/other_user}","gists_url":"https://api.github.com/users/pyvec/gists{/gist_id}","starred_url":"https://api.github.com/users/pyvec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyvec/subscriptions","organizations_url":"https://api.github.com/users/pyvec/orgs","repos_url":"https://api.github.com/users/pyvec/repos","events_url":"https://api.github.com/users/pyvec/events{/privacy}","received_events_url":"https://api.github.com/users/pyvec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyvec/pyvec.org","description":"Website of Pyvec nonprofit / Webová stránka neziskovky Pyvec","fork":false,"url":"https://api.github.com/repos/pyvec/pyvec.org","forks_url":"https://api.github.com/repos/pyvec/pyvec.org/forks","keys_url":"https://api.github.com/repos/pyvec/pyvec.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyvec/pyvec.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyvec/pyvec.org/teams","hooks_url":"https://api.github.com/repos/pyvec/pyvec.org/hooks","issue_events_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/events{/number}","events_url":"https://api.github.com/repos/pyvec/pyvec.org/events","assignees_url":"https://api.github.com/repos/pyvec/pyvec.org/assignees{/user}","branches_url":"https://api.github.com/repos/pyvec/pyvec.org/branches{/branch}","tags_url":"https://api.github.com/repos/pyvec/pyvec.org/tags","blobs_url":"https://api.github.com/repos/pyvec/pyvec.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyvec/pyvec.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyvec/pyvec.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyvec/pyvec.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyvec/pyvec.org/statuses/{sha}","languages_url":"https://api.github.com/repos/pyvec/pyvec.org/languages","stargazers_url":"https://api.github.com/repos/pyvec/pyvec.org/stargazers","contributors_url":"https://api.github.com/repos/pyvec/pyvec.org/contributors","subscribers_url":"https://api.github.com/repos/pyvec/pyvec.org/subscribers","subscription_url":"https://api.github.com/repos/pyvec/pyvec.org/subscription","commits_url":"https://api.github.com/repos/pyvec/pyvec.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyvec/pyvec.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyvec/pyvec.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyvec/pyvec.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyvec/pyvec.org/contents/{+path}","compare_url":"https://api.github.com/repos/pyvec/pyvec.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyvec/pyvec.org/merges","archive_url":"https://api.github.com/repos/pyvec/pyvec.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyvec/pyvec.org/downloads","issues_url":"https://api.github.com/repos/pyvec/pyvec.org/issues{/number}","pulls_url":"https://api.github.com/repos/pyvec/pyvec.org/pulls{/number}","milestones_url":"https://api.github.com/repos/pyvec/pyvec.org/milestones{/number}","notifications_url":"https://api.github.com/repos/pyvec/pyvec.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyvec/pyvec.org/labels{/name}","releases_url":"https://api.github.com/repos/pyvec/pyvec.org/releases{/id}","deployments_url":"https://api.github.com/repos/pyvec/pyvec.org/deployments","created_at":"2011-06-02T09:52:26Z","updated_at":"2018-06-06T16:51:24Z","pushed_at":"2018-08-09T17:06:14Z","git_url":"git://github.com/pyvec/pyvec.org.git","ssh_url":"git@github.com:pyvec/pyvec.org.git","clone_url":"https://github.com/pyvec/pyvec.org.git","svn_url":"https://github.com/pyvec/pyvec.org","homepage":"http://pyvec.org","size":13942,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34"},"html":{"href":"https://github.com/pyvec/pyvec.org/pull/34"},"issue":{"href":"https://api.github.com/repos/pyvec/pyvec.org/issues/34"},"comments":{"href":"https://api.github.com/repos/pyvec/pyvec.org/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyvec/pyvec.org/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/pyvec/pyvec.org/statuses/fe790aaccdee09328ec71f950325b3b2edf85d4e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"hroncok"}}