{"action":"created","comment":{"url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/comments/57492725","id":57492725,"diff_hunk":"@@ -59,7 +59,31 @@ def register():\n @app.route('/')\n @login_required\n def index():\n-    return flask.render_template('index.html')\n+    preferences = db.get_preferences_by_userid(current_user.id)\n+    return flask.render_template(\n+        'index.html',\n+        form=forms.FoodPreferenceForm(),\n+        preferences=preferences)\n+\n+@app.route('/preference/delete/<int:pref_id>', methods=['DELETE'])\n+@login_required\n+def delete_preference(pref_id):\n+    preference = db.get_preference_by_id(pref_id=pref_id)\n+    if preference is None:\n+        return flask.jsonify(success=True)\n+    db.delete_preference(preference)\n+    return flask.jsonify(success=True)\n+\n+@app.route('/preference/add', methods=['POST'])","path":"app/server.py","position":20,"original_position":20,"commit_id":"57a70750b1edbf4ed8fa2dabb631de2d742d5357","original_commit_id":"57a70750b1edbf4ed8fa2dabb631de2d742d5357","user":{"login":"nikklassen","id":3314933,"avatar_url":"https://avatars.githubusercontent.com/u/3314933?v=3","gravatar_id":"","url":"https://api.github.com/users/nikklassen","html_url":"https://github.com/nikklassen","followers_url":"https://api.github.com/users/nikklassen/followers","following_url":"https://api.github.com/users/nikklassen/following{/other_user}","gists_url":"https://api.github.com/users/nikklassen/gists{/gist_id}","starred_url":"https://api.github.com/users/nikklassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikklassen/subscriptions","organizations_url":"https://api.github.com/users/nikklassen/orgs","repos_url":"https://api.github.com/users/nikklassen/repos","events_url":"https://api.github.com/users/nikklassen/events{/privacy}","received_events_url":"https://api.github.com/users/nikklassen/received_events","type":"User","site_admin":false},"body":"Also plural","created_at":"2016-03-25T21:23:18Z","updated_at":"2016-03-25T21:23:18Z","html_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16#discussion_r57492725","pull_request_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/comments/57492725"},"html":{"href":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16#discussion_r57492725"},"pull_request":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16","id":64134761,"html_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16","diff_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16.diff","patch_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16.patch","issue_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/16","number":16,"state":"open","locked":false,"title":"Food preferences","user":{"login":"loewen-uwaterloo","id":3021886,"avatar_url":"https://avatars.githubusercontent.com/u/3021886?v=3","gravatar_id":"","url":"https://api.github.com/users/loewen-uwaterloo","html_url":"https://github.com/loewen-uwaterloo","followers_url":"https://api.github.com/users/loewen-uwaterloo/followers","following_url":"https://api.github.com/users/loewen-uwaterloo/following{/other_user}","gists_url":"https://api.github.com/users/loewen-uwaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/loewen-uwaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loewen-uwaterloo/subscriptions","organizations_url":"https://api.github.com/users/loewen-uwaterloo/orgs","repos_url":"https://api.github.com/users/loewen-uwaterloo/repos","events_url":"https://api.github.com/users/loewen-uwaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/loewen-uwaterloo/received_events","type":"User","site_admin":false},"body":"Add/remove/list are all available from the home page.   I'll style once our base css files are pushed so I know what we have to work with.","created_at":"2016-03-25T06:17:49Z","updated_at":"2016-03-25T21:23:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cd9288d93d4539811bddcad381d107f4f66e4fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16/commits","review_comments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16/comments","review_comment_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/16/comments","statuses_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/statuses/57a70750b1edbf4ed8fa2dabb631de2d742d5357","head":{"label":"loewen-uwaterloo:food-preferences","ref":"food-preferences","sha":"57a70750b1edbf4ed8fa2dabb631de2d742d5357","user":{"login":"loewen-uwaterloo","id":3021886,"avatar_url":"https://avatars.githubusercontent.com/u/3021886?v=3","gravatar_id":"","url":"https://api.github.com/users/loewen-uwaterloo","html_url":"https://github.com/loewen-uwaterloo","followers_url":"https://api.github.com/users/loewen-uwaterloo/followers","following_url":"https://api.github.com/users/loewen-uwaterloo/following{/other_user}","gists_url":"https://api.github.com/users/loewen-uwaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/loewen-uwaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loewen-uwaterloo/subscriptions","organizations_url":"https://api.github.com/users/loewen-uwaterloo/orgs","repos_url":"https://api.github.com/users/loewen-uwaterloo/repos","events_url":"https://api.github.com/users/loewen-uwaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/loewen-uwaterloo/received_events","type":"User","site_admin":false},"repo":{"id":48500703,"name":"grebel-menu-scraper","full_name":"loewen-uwaterloo/grebel-menu-scraper","owner":{"login":"loewen-uwaterloo","id":3021886,"avatar_url":"https://avatars.githubusercontent.com/u/3021886?v=3","gravatar_id":"","url":"https://api.github.com/users/loewen-uwaterloo","html_url":"https://github.com/loewen-uwaterloo","followers_url":"https://api.github.com/users/loewen-uwaterloo/followers","following_url":"https://api.github.com/users/loewen-uwaterloo/following{/other_user}","gists_url":"https://api.github.com/users/loewen-uwaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/loewen-uwaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loewen-uwaterloo/subscriptions","organizations_url":"https://api.github.com/users/loewen-uwaterloo/orgs","repos_url":"https://api.github.com/users/loewen-uwaterloo/repos","events_url":"https://api.github.com/users/loewen-uwaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/loewen-uwaterloo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper","description":"","fork":false,"url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper","forks_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/forks","keys_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/teams","hooks_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/hooks","issue_events_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/events{/number}","events_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/events","assignees_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/assignees{/user}","branches_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/branches{/branch}","tags_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/tags","blobs_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/refs{/sha}","trees_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/statuses/{sha}","languages_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/languages","stargazers_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/stargazers","contributors_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/contributors","subscribers_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/subscribers","subscription_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/subscription","commits_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/commits{/sha}","git_commits_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/commits{/sha}","comments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/comments{/number}","issue_comment_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/comments{/number}","contents_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/contents/{+path}","compare_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/merges","archive_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/downloads","issues_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues{/number}","pulls_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls{/number}","milestones_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/milestones{/number}","notifications_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/labels{/name}","releases_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/releases{/id}","deployments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/deployments","created_at":"2015-12-23T16:40:23Z","updated_at":"2016-02-27T01:25:16Z","pushed_at":"2016-03-25T06:53:20Z","git_url":"git://github.com/loewen-uwaterloo/grebel-menu-scraper.git","ssh_url":"git@github.com:loewen-uwaterloo/grebel-menu-scraper.git","clone_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper.git","svn_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper","homepage":null,"size":119,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"loewen-uwaterloo:master","ref":"master","sha":"5a3ee5ecf133ce6d9627fcd53aacfb954bfd7037","user":{"login":"loewen-uwaterloo","id":3021886,"avatar_url":"https://avatars.githubusercontent.com/u/3021886?v=3","gravatar_id":"","url":"https://api.github.com/users/loewen-uwaterloo","html_url":"https://github.com/loewen-uwaterloo","followers_url":"https://api.github.com/users/loewen-uwaterloo/followers","following_url":"https://api.github.com/users/loewen-uwaterloo/following{/other_user}","gists_url":"https://api.github.com/users/loewen-uwaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/loewen-uwaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loewen-uwaterloo/subscriptions","organizations_url":"https://api.github.com/users/loewen-uwaterloo/orgs","repos_url":"https://api.github.com/users/loewen-uwaterloo/repos","events_url":"https://api.github.com/users/loewen-uwaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/loewen-uwaterloo/received_events","type":"User","site_admin":false},"repo":{"id":48500703,"name":"grebel-menu-scraper","full_name":"loewen-uwaterloo/grebel-menu-scraper","owner":{"login":"loewen-uwaterloo","id":3021886,"avatar_url":"https://avatars.githubusercontent.com/u/3021886?v=3","gravatar_id":"","url":"https://api.github.com/users/loewen-uwaterloo","html_url":"https://github.com/loewen-uwaterloo","followers_url":"https://api.github.com/users/loewen-uwaterloo/followers","following_url":"https://api.github.com/users/loewen-uwaterloo/following{/other_user}","gists_url":"https://api.github.com/users/loewen-uwaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/loewen-uwaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loewen-uwaterloo/subscriptions","organizations_url":"https://api.github.com/users/loewen-uwaterloo/orgs","repos_url":"https://api.github.com/users/loewen-uwaterloo/repos","events_url":"https://api.github.com/users/loewen-uwaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/loewen-uwaterloo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper","description":"","fork":false,"url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper","forks_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/forks","keys_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/teams","hooks_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/hooks","issue_events_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/events{/number}","events_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/events","assignees_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/assignees{/user}","branches_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/branches{/branch}","tags_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/tags","blobs_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/refs{/sha}","trees_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/statuses/{sha}","languages_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/languages","stargazers_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/stargazers","contributors_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/contributors","subscribers_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/subscribers","subscription_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/subscription","commits_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/commits{/sha}","git_commits_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/git/commits{/sha}","comments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/comments{/number}","issue_comment_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/comments{/number}","contents_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/contents/{+path}","compare_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/merges","archive_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/downloads","issues_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues{/number}","pulls_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls{/number}","milestones_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/milestones{/number}","notifications_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/labels{/name}","releases_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/releases{/id}","deployments_url":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/deployments","created_at":"2015-12-23T16:40:23Z","updated_at":"2016-02-27T01:25:16Z","pushed_at":"2016-03-25T06:53:20Z","git_url":"git://github.com/loewen-uwaterloo/grebel-menu-scraper.git","ssh_url":"git@github.com:loewen-uwaterloo/grebel-menu-scraper.git","clone_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper.git","svn_url":"https://github.com/loewen-uwaterloo/grebel-menu-scraper","homepage":null,"size":119,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16"},"html":{"href":"https://github.com/loewen-uwaterloo/grebel-menu-scraper/pull/16"},"issue":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/16"},"comments":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/loewen-uwaterloo/grebel-menu-scraper/statuses/57a70750b1edbf4ed8fa2dabb631de2d742d5357"}}}}