{"action":"created","comment":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/56114722","id":56114722,"diff_hunk":"@@ -114,28 +86,42 @@ def do_signup():\n         errors.append(\"User with this username or email already exists.\")\n \n     if errors:\n-        return template('signup', errors=errors)\n+        return redirect_with_query(error_uri, {\n+            \"error\": \" \".join(errors),\n+            \"next\": success_uri,\n+            \"email\": email,\n+            \"username\": username,\n+        })\n \n     # Create unverified user\n     _, verification_key = local.model.add_user(username, email, password)\n \n-    return send_verification_key(username, email, verification_key)\n+    # Send key\n+    send_verification_key(username, email, verification_key)\n+\n+    # Redirect to success page\n+    return redirect_with_query(success_uri, {\n+        \"email\": email\n+    })\n \n \n @get('/account/verify/<key>', skip=UserVerifiedPlugin)\n def do_verify(key):\n     if local.model.verify_user(key):\n-        return redirect(default_app().get_url('success', message=\"Account verified!\"))\n+        return redirect('/account/verify/success')\n     else:\n-        return \"Invalid or expired verification key.\"\n+        return redirect('/account/verify/error')\n \n \n @get('/account/resend', name='resend_key', skip=UserVerifiedPlugin)","path":"codalab/rest/account.py","position":134,"original_position":134,"commit_id":"9f33709b8c0fd01c2106c0979bc309530f7f26ea","original_commit_id":"9f33709b8c0fd01c2106c0979bc309530f7f26ea","user":{"login":"klopyrev","id":5249090,"avatar_url":"https://avatars.githubusercontent.com/u/5249090?v=3","gravatar_id":"","url":"https://api.github.com/users/klopyrev","html_url":"https://github.com/klopyrev","followers_url":"https://api.github.com/users/klopyrev/followers","following_url":"https://api.github.com/users/klopyrev/following{/other_user}","gists_url":"https://api.github.com/users/klopyrev/gists{/gist_id}","starred_url":"https://api.github.com/users/klopyrev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klopyrev/subscriptions","organizations_url":"https://api.github.com/users/klopyrev/orgs","repos_url":"https://api.github.com/users/klopyrev/repos","events_url":"https://api.github.com/users/klopyrev/events{/privacy}","received_events_url":"https://api.github.com/users/klopyrev/received_events","type":"User","site_admin":false},"body":"OK, how about this... Is this API currently used by any code, or do you\nhave any immediate plans to add code that does?\n\nIf not, it's dead code and should not be there. Dead code just confuses\nfuture readers of the code.\nOn Mar 14, 2016 9:41 PM, \"Konstantin Lopyrev\" <klopyrev@gmail.com> wrote:\n\n> Is it actually used?\n> On Mar 14, 2016 8:57 PM, \"Stephen Koo\" <notifications@github.com> wrote:\n>\n>> In codalab/rest/account.py\n>> <https://github.com/codalab/codalab-cli/pull/396#discussion_r56112542>:\n>>\n>> >      else:\n>> > -        return \"Invalid or expired verification key.\"\n>> > +        return redirect('/account/verify/error')\n>> >\n>> >\n>> >  @get('/account/resend', name='resend_key', skip=UserVerifiedPlugin)\n>>\n>> This is for if someone's email client screws up the link, or the link is\n>> miscopied. It might be possible :P\n>>\n>> —\n>> You are receiving this because you were mentioned.\n>> Reply to this email directly or view it on GitHub:\n>> https://github.com/codalab/codalab-cli/pull/396/files#r56112542\n>>\n>\n","created_at":"2016-03-15T04:44:15Z","updated_at":"2016-03-15T04:44:15Z","html_url":"https://github.com/codalab/codalab-cli/pull/396#discussion_r56114722","pull_request_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/396","_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/56114722"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/396#discussion_r56114722"},"pull_request":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/396"}}},"pull_request":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/396","id":62825713,"html_url":"https://github.com/codalab/codalab-cli/pull/396","diff_url":"https://github.com/codalab/codalab-cli/pull/396.diff","patch_url":"https://github.com/codalab/codalab-cli/pull/396.patch","issue_url":"https://api.github.com/repos/codalab/codalab-cli/issues/396","number":396,"state":"open","locked":false,"title":"Use django account views","user":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"body":"Use account views created in codalab/codalab-worksheets#123\r\nMust be merged  #together.\r\n\r\n@klopyrev @percyliang ","created_at":"2016-03-14T22:09:44Z","updated_at":"2016-03-15T04:44:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a4465012ddcd1d3eeb881afc12ceacabf40db1d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/396/commits","review_comments_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/396/comments","review_comment_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/issues/396/comments","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/9f33709b8c0fd01c2106c0979bc309530f7f26ea","head":{"label":"kashizui:no-templates","ref":"no-templates","sha":"9f33709b8c0fd01c2106c0979bc309530f7f26ea","user":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"repo":{"id":42873179,"name":"codalab-cli","full_name":"kashizui/codalab-cli","owner":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kashizui/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":true,"url":"https://api.github.com/repos/kashizui/codalab-cli","forks_url":"https://api.github.com/repos/kashizui/codalab-cli/forks","keys_url":"https://api.github.com/repos/kashizui/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kashizui/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kashizui/codalab-cli/teams","hooks_url":"https://api.github.com/repos/kashizui/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/kashizui/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/kashizui/codalab-cli/events","assignees_url":"https://api.github.com/repos/kashizui/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/kashizui/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/kashizui/codalab-cli/tags","blobs_url":"https://api.github.com/repos/kashizui/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kashizui/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kashizui/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/kashizui/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kashizui/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/kashizui/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/kashizui/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/kashizui/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/kashizui/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/kashizui/codalab-cli/subscription","commits_url":"https://api.github.com/repos/kashizui/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/kashizui/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/kashizui/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/kashizui/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/kashizui/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/kashizui/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kashizui/codalab-cli/merges","archive_url":"https://api.github.com/repos/kashizui/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kashizui/codalab-cli/downloads","issues_url":"https://api.github.com/repos/kashizui/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/kashizui/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/kashizui/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/kashizui/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kashizui/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/kashizui/codalab-cli/releases{/id}","deployments_url":"https://api.github.com/repos/kashizui/codalab-cli/deployments","created_at":"2015-09-21T14:55:54Z","updated_at":"2015-09-21T14:55:54Z","pushed_at":"2016-03-14T23:34:36Z","git_url":"git://github.com/kashizui/codalab-cli.git","ssh_url":"git@github.com:kashizui/codalab-cli.git","clone_url":"https://github.com/kashizui/codalab-cli.git","svn_url":"https://github.com/kashizui/codalab-cli","homepage":null,"size":2456,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codalab:develop","ref":"develop","sha":"067b730efc3f3d10ef1b61c50d41a3fc883ea79c","user":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"User","site_admin":false},"repo":{"id":27352490,"name":"codalab-cli","full_name":"codalab/codalab-cli","owner":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codalab/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":false,"url":"https://api.github.com/repos/codalab/codalab-cli","forks_url":"https://api.github.com/repos/codalab/codalab-cli/forks","keys_url":"https://api.github.com/repos/codalab/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codalab/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codalab/codalab-cli/teams","hooks_url":"https://api.github.com/repos/codalab/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/codalab/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/codalab/codalab-cli/events","assignees_url":"https://api.github.com/repos/codalab/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/codalab/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/codalab/codalab-cli/tags","blobs_url":"https://api.github.com/repos/codalab/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codalab/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codalab/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/codalab/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/codalab/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/codalab/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/codalab/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/codalab/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/codalab/codalab-cli/subscription","commits_url":"https://api.github.com/repos/codalab/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/codalab/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/codalab/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/codalab/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/codalab/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codalab/codalab-cli/merges","archive_url":"https://api.github.com/repos/codalab/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codalab/codalab-cli/downloads","issues_url":"https://api.github.com/repos/codalab/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/codalab/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/codalab/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/codalab/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codalab/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/codalab/codalab-cli/releases{/id}","deployments_url":"https://api.github.com/repos/codalab/codalab-cli/deployments","created_at":"2014-11-30T22:33:18Z","updated_at":"2016-01-19T21:16:59Z","pushed_at":"2016-03-15T04:02:22Z","git_url":"git://github.com/codalab/codalab-cli.git","ssh_url":"git@github.com:codalab/codalab-cli.git","clone_url":"https://github.com/codalab/codalab-cli.git","svn_url":"https://github.com/codalab/codalab-cli","homepage":null,"size":2506,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":57,"forks":11,"open_issues":57,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/396"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/396"},"issue":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/396"},"comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/396/comments"},"review_comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/396/comments"},"review_comment":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/396/commits"},"statuses":{"href":"https://api.github.com/repos/codalab/codalab-cli/statuses/9f33709b8c0fd01c2106c0979bc309530f7f26ea"}}}}