{"action":"created","comment":{"url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/comments/141324795","pull_request_review_id":65520279,"id":141324795,"diff_hunk":"@@ -0,0 +1,128 @@\n+from flask import Flask, render_template,g, flash, redirect, url_for, session, request, logging\n+from wtforms import Form, StringField, TextAreaField, PasswordField, validators\n+from models import User,Recipe_category,Recipe,repository\n+\n+USERS= []\n+recipe_categories =[\"dinner\",\"supper\",\"lunch\"]\n+recipes = []\n+app = Flask(__name__)\n+\n+class RegisterForm(Form):\n+    name = StringField('Name', [validators.Length(min=1, max=50)])\n+    username = StringField('Username', [validators.Length(min=4, max=25)])\n+    email = StringField('Email', [validators.Length(min=6, max=50)])\n+    password = PasswordField('Password', [\n+        validators.DataRequired(),\n+        validators.EqualTo('confirm', message='Passwords do not match')\n+    ])  \n+    confirm = PasswordField('Confirm Password')\n+\n+class LoginForm(Form):\n+    username = StringField('Username', [validators.Length(min=4, max=25)])\n+    password = PasswordField('Password', [\n+        validators.DataRequired(),validators.EqualTo('confirm', message='Passwords do not match')\n+    ])  \n+\n+@app.route('/')\n+def home():\n+    return render_template('home.html')\n+\n+# User Register\n+@app.route('/register', methods=['GET', 'POST'])\n+def register():\n+    form = RegisterForm(request.form)\n+    if request.method == 'POST' and form.validate():\n+        name = form.name.data\n+        email = form.email.data\n+        username = form.username.data\n+        password = form.password.data\n+\n+        user = User(username, email, password)\n+        # Commit to DB\n+        USERS.append(user)\n+\n+        flash('You are now registered and can log in', 'success')\n+        return render_template('login.html')\n+    return render_template('register.html', form=form)\n+# User login\n+@app.route('/login', methods=['GET', 'POST'])\n+def login():\n+    form = LoginForm(request.form)\n+    password = form.password.data\n+    if request.method == 'POST':\n+        # Get Form Fields\n+        username = str(request.form['username'])\n+        password_candidate = str(request.form['password'])\n+\n+            # Compare Passwords\n+        if (password_candidate, password):\n+            # Passed\n+            session['logged_in'] = True\n+            session['username'] = username\n+\n+            flash('You are now logged in', 'success')\n+            return redirect(url_for('dashboard'))\n+        else:\n+            error = 'Invalid login'\n+            return render_template('login.html', error=error)\n+    return render_template(\"login.html\")\n+\n+@app.route('/dashboard')","path":"app/app.py","position":70,"original_position":70,"commit_id":"a590b04bf508ee112f0e0d60ae42c1e46003eb1f","original_commit_id":"a590b04bf508ee112f0e0d60ae42c1e46003eb1f","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"expected 2 blank lines, found 1","created_at":"2017-09-27T12:19:33Z","updated_at":"2017-09-27T12:19:33Z","html_url":"https://github.com/ruganda/YummyRecipes/pull/5#discussion_r141324795","pull_request_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/comments/141324795"},"html":{"href":"https://github.com/ruganda/YummyRecipes/pull/5#discussion_r141324795"},"pull_request":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5","id":143376605,"html_url":"https://github.com/ruganda/YummyRecipes/pull/5","diff_url":"https://github.com/ruganda/YummyRecipes/pull/5.diff","patch_url":"https://github.com/ruganda/YummyRecipes/pull/5.patch","issue_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/5","number":5,"state":"open","locked":false,"title":"Develop","user":{"login":"ruganda","id":30200454,"avatar_url":"https://avatars1.githubusercontent.com/u/30200454?v=4","gravatar_id":"","url":"https://api.github.com/users/ruganda","html_url":"https://github.com/ruganda","followers_url":"https://api.github.com/users/ruganda/followers","following_url":"https://api.github.com/users/ruganda/following{/other_user}","gists_url":"https://api.github.com/users/ruganda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruganda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruganda/subscriptions","organizations_url":"https://api.github.com/users/ruganda/orgs","repos_url":"https://api.github.com/users/ruganda/repos","events_url":"https://api.github.com/users/ruganda/events{/privacy}","received_events_url":"https://api.github.com/users/ruganda/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-27T12:19:24Z","updated_at":"2017-09-27T12:19:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"193c1e6ceaa313e69616f526bf464252155a0519","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5/commits","review_comments_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5/comments","review_comment_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/5/comments","statuses_url":"https://api.github.com/repos/ruganda/YummyRecipes/statuses/a590b04bf508ee112f0e0d60ae42c1e46003eb1f","head":{"label":"ruganda:develop","ref":"develop","sha":"a590b04bf508ee112f0e0d60ae42c1e46003eb1f","user":{"login":"ruganda","id":30200454,"avatar_url":"https://avatars1.githubusercontent.com/u/30200454?v=4","gravatar_id":"","url":"https://api.github.com/users/ruganda","html_url":"https://github.com/ruganda","followers_url":"https://api.github.com/users/ruganda/followers","following_url":"https://api.github.com/users/ruganda/following{/other_user}","gists_url":"https://api.github.com/users/ruganda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruganda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruganda/subscriptions","organizations_url":"https://api.github.com/users/ruganda/orgs","repos_url":"https://api.github.com/users/ruganda/repos","events_url":"https://api.github.com/users/ruganda/events{/privacy}","received_events_url":"https://api.github.com/users/ruganda/received_events","type":"User","site_admin":false},"repo":{"id":104749378,"name":"YummyRecipes","full_name":"ruganda/YummyRecipes","owner":{"login":"ruganda","id":30200454,"avatar_url":"https://avatars1.githubusercontent.com/u/30200454?v=4","gravatar_id":"","url":"https://api.github.com/users/ruganda","html_url":"https://github.com/ruganda","followers_url":"https://api.github.com/users/ruganda/followers","following_url":"https://api.github.com/users/ruganda/following{/other_user}","gists_url":"https://api.github.com/users/ruganda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruganda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruganda/subscriptions","organizations_url":"https://api.github.com/users/ruganda/orgs","repos_url":"https://api.github.com/users/ruganda/repos","events_url":"https://api.github.com/users/ruganda/events{/privacy}","received_events_url":"https://api.github.com/users/ruganda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruganda/YummyRecipes","description":null,"fork":false,"url":"https://api.github.com/repos/ruganda/YummyRecipes","forks_url":"https://api.github.com/repos/ruganda/YummyRecipes/forks","keys_url":"https://api.github.com/repos/ruganda/YummyRecipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruganda/YummyRecipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruganda/YummyRecipes/teams","hooks_url":"https://api.github.com/repos/ruganda/YummyRecipes/hooks","issue_events_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/events{/number}","events_url":"https://api.github.com/repos/ruganda/YummyRecipes/events","assignees_url":"https://api.github.com/repos/ruganda/YummyRecipes/assignees{/user}","branches_url":"https://api.github.com/repos/ruganda/YummyRecipes/branches{/branch}","tags_url":"https://api.github.com/repos/ruganda/YummyRecipes/tags","blobs_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruganda/YummyRecipes/statuses/{sha}","languages_url":"https://api.github.com/repos/ruganda/YummyRecipes/languages","stargazers_url":"https://api.github.com/repos/ruganda/YummyRecipes/stargazers","contributors_url":"https://api.github.com/repos/ruganda/YummyRecipes/contributors","subscribers_url":"https://api.github.com/repos/ruganda/YummyRecipes/subscribers","subscription_url":"https://api.github.com/repos/ruganda/YummyRecipes/subscription","commits_url":"https://api.github.com/repos/ruganda/YummyRecipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruganda/YummyRecipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruganda/YummyRecipes/contents/{+path}","compare_url":"https://api.github.com/repos/ruganda/YummyRecipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruganda/YummyRecipes/merges","archive_url":"https://api.github.com/repos/ruganda/YummyRecipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruganda/YummyRecipes/downloads","issues_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues{/number}","pulls_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls{/number}","milestones_url":"https://api.github.com/repos/ruganda/YummyRecipes/milestones{/number}","notifications_url":"https://api.github.com/repos/ruganda/YummyRecipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruganda/YummyRecipes/labels{/name}","releases_url":"https://api.github.com/repos/ruganda/YummyRecipes/releases{/id}","deployments_url":"https://api.github.com/repos/ruganda/YummyRecipes/deployments","created_at":"2017-09-25T12:51:18Z","updated_at":"2017-09-25T13:59:47Z","pushed_at":"2017-09-27T12:19:25Z","git_url":"git://github.com/ruganda/YummyRecipes.git","ssh_url":"git@github.com:ruganda/YummyRecipes.git","clone_url":"https://github.com/ruganda/YummyRecipes.git","svn_url":"https://github.com/ruganda/YummyRecipes","homepage":null,"size":277,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ruganda:master","ref":"master","sha":"b38b8cb3a9d12b066e8034d428858f9491f0fce8","user":{"login":"ruganda","id":30200454,"avatar_url":"https://avatars1.githubusercontent.com/u/30200454?v=4","gravatar_id":"","url":"https://api.github.com/users/ruganda","html_url":"https://github.com/ruganda","followers_url":"https://api.github.com/users/ruganda/followers","following_url":"https://api.github.com/users/ruganda/following{/other_user}","gists_url":"https://api.github.com/users/ruganda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruganda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruganda/subscriptions","organizations_url":"https://api.github.com/users/ruganda/orgs","repos_url":"https://api.github.com/users/ruganda/repos","events_url":"https://api.github.com/users/ruganda/events{/privacy}","received_events_url":"https://api.github.com/users/ruganda/received_events","type":"User","site_admin":false},"repo":{"id":104749378,"name":"YummyRecipes","full_name":"ruganda/YummyRecipes","owner":{"login":"ruganda","id":30200454,"avatar_url":"https://avatars1.githubusercontent.com/u/30200454?v=4","gravatar_id":"","url":"https://api.github.com/users/ruganda","html_url":"https://github.com/ruganda","followers_url":"https://api.github.com/users/ruganda/followers","following_url":"https://api.github.com/users/ruganda/following{/other_user}","gists_url":"https://api.github.com/users/ruganda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruganda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruganda/subscriptions","organizations_url":"https://api.github.com/users/ruganda/orgs","repos_url":"https://api.github.com/users/ruganda/repos","events_url":"https://api.github.com/users/ruganda/events{/privacy}","received_events_url":"https://api.github.com/users/ruganda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruganda/YummyRecipes","description":null,"fork":false,"url":"https://api.github.com/repos/ruganda/YummyRecipes","forks_url":"https://api.github.com/repos/ruganda/YummyRecipes/forks","keys_url":"https://api.github.com/repos/ruganda/YummyRecipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruganda/YummyRecipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruganda/YummyRecipes/teams","hooks_url":"https://api.github.com/repos/ruganda/YummyRecipes/hooks","issue_events_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/events{/number}","events_url":"https://api.github.com/repos/ruganda/YummyRecipes/events","assignees_url":"https://api.github.com/repos/ruganda/YummyRecipes/assignees{/user}","branches_url":"https://api.github.com/repos/ruganda/YummyRecipes/branches{/branch}","tags_url":"https://api.github.com/repos/ruganda/YummyRecipes/tags","blobs_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruganda/YummyRecipes/statuses/{sha}","languages_url":"https://api.github.com/repos/ruganda/YummyRecipes/languages","stargazers_url":"https://api.github.com/repos/ruganda/YummyRecipes/stargazers","contributors_url":"https://api.github.com/repos/ruganda/YummyRecipes/contributors","subscribers_url":"https://api.github.com/repos/ruganda/YummyRecipes/subscribers","subscription_url":"https://api.github.com/repos/ruganda/YummyRecipes/subscription","commits_url":"https://api.github.com/repos/ruganda/YummyRecipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruganda/YummyRecipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruganda/YummyRecipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruganda/YummyRecipes/contents/{+path}","compare_url":"https://api.github.com/repos/ruganda/YummyRecipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruganda/YummyRecipes/merges","archive_url":"https://api.github.com/repos/ruganda/YummyRecipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruganda/YummyRecipes/downloads","issues_url":"https://api.github.com/repos/ruganda/YummyRecipes/issues{/number}","pulls_url":"https://api.github.com/repos/ruganda/YummyRecipes/pulls{/number}","milestones_url":"https://api.github.com/repos/ruganda/YummyRecipes/milestones{/number}","notifications_url":"https://api.github.com/repos/ruganda/YummyRecipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruganda/YummyRecipes/labels{/name}","releases_url":"https://api.github.com/repos/ruganda/YummyRecipes/releases{/id}","deployments_url":"https://api.github.com/repos/ruganda/YummyRecipes/deployments","created_at":"2017-09-25T12:51:18Z","updated_at":"2017-09-25T13:59:47Z","pushed_at":"2017-09-27T12:19:25Z","git_url":"git://github.com/ruganda/YummyRecipes.git","ssh_url":"git@github.com:ruganda/YummyRecipes.git","clone_url":"https://github.com/ruganda/YummyRecipes.git","svn_url":"https://github.com/ruganda/YummyRecipes","homepage":null,"size":277,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5"},"html":{"href":"https://github.com/ruganda/YummyRecipes/pull/5"},"issue":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/issues/5"},"comments":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/ruganda/YummyRecipes/statuses/a590b04bf508ee112f0e0d60ae42c1e46003eb1f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}