{"action":"created","comment":{"url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/comments/42001376","id":42001376,"diff_hunk":"@@ -51,3 +52,12 @@ def signup_post():\n         user.save()\n         return redirect('/signin')\n     return { 'form': form }\n+\n+@app.get('/<username>')\n+@jinja2_view('user.html')\n+def user_index(username):\n+    user = User.objects(username=username).first()\n+    if user:\n+        pastes = Paste.objects(user=user)","path":"daimaduan/views/users.py","position":18,"original_position":18,"commit_id":"f003684965ec020143ab0862c34b55df40cfa11b","original_commit_id":"f003684965ec020143ab0862c34b55df40cfa11b","user":{"login":"david-xie","id":100747,"avatar_url":"https://avatars.githubusercontent.com/u/100747?v=3","gravatar_id":"","url":"https://api.github.com/users/david-xie","html_url":"https://github.com/david-xie","followers_url":"https://api.github.com/users/david-xie/followers","following_url":"https://api.github.com/users/david-xie/following{/other_user}","gists_url":"https://api.github.com/users/david-xie/gists{/gist_id}","starred_url":"https://api.github.com/users/david-xie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-xie/subscriptions","organizations_url":"https://api.github.com/users/david-xie/orgs","repos_url":"https://api.github.com/users/david-xie/repos","events_url":"https://api.github.com/users/david-xie/events{/privacy}","received_events_url":"https://api.github.com/users/david-xie/received_events","type":"User","site_admin":false},"body":"对Paste进行倒序. Paste.objects(user=user).order_by('-updated_at')","created_at":"2015-10-14T14:36:48Z","updated_at":"2015-10-14T14:36:48Z","html_url":"https://github.com/DoubleCiti/daimaduan.com/pull/30#discussion_r42001376","pull_request_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/comments/42001376"},"html":{"href":"https://github.com/DoubleCiti/daimaduan.com/pull/30#discussion_r42001376"},"pull_request":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30","id":47666299,"html_url":"https://github.com/DoubleCiti/daimaduan.com/pull/30","diff_url":"https://github.com/DoubleCiti/daimaduan.com/pull/30.diff","patch_url":"https://github.com/DoubleCiti/daimaduan.com/pull/30.patch","issue_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/30","number":30,"state":"open","locked":false,"title":"[issue #11] 增加用户主页","user":{"login":"liul85","id":1312723,"avatar_url":"https://avatars.githubusercontent.com/u/1312723?v=3","gravatar_id":"","url":"https://api.github.com/users/liul85","html_url":"https://github.com/liul85","followers_url":"https://api.github.com/users/liul85/followers","following_url":"https://api.github.com/users/liul85/following{/other_user}","gists_url":"https://api.github.com/users/liul85/gists{/gist_id}","starred_url":"https://api.github.com/users/liul85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liul85/subscriptions","organizations_url":"https://api.github.com/users/liul85/orgs","repos_url":"https://api.github.com/users/liul85/repos","events_url":"https://api.github.com/users/liul85/events{/privacy}","received_events_url":"https://api.github.com/users/liul85/received_events","type":"User","site_admin":false},"body":"1. 样式太丑，后面再改吧。\r\n2. Gravatar被墙了，不翻墙照片显示不出来，囧。","created_at":"2015-10-14T14:27:55Z","updated_at":"2015-10-14T14:36:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e67a13e5956e74809f7302f6aff422bea8ceceb9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30/commits","review_comments_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30/comments","review_comment_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/30/comments","statuses_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/statuses/f003684965ec020143ab0862c34b55df40cfa11b","head":{"label":"liul85:user_page","ref":"user_page","sha":"f003684965ec020143ab0862c34b55df40cfa11b","user":{"login":"liul85","id":1312723,"avatar_url":"https://avatars.githubusercontent.com/u/1312723?v=3","gravatar_id":"","url":"https://api.github.com/users/liul85","html_url":"https://github.com/liul85","followers_url":"https://api.github.com/users/liul85/followers","following_url":"https://api.github.com/users/liul85/following{/other_user}","gists_url":"https://api.github.com/users/liul85/gists{/gist_id}","starred_url":"https://api.github.com/users/liul85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liul85/subscriptions","organizations_url":"https://api.github.com/users/liul85/orgs","repos_url":"https://api.github.com/users/liul85/repos","events_url":"https://api.github.com/users/liul85/events{/privacy}","received_events_url":"https://api.github.com/users/liul85/received_events","type":"User","site_admin":false},"repo":{"id":41522508,"name":"daimaduan.com","full_name":"liul85/daimaduan.com","owner":{"login":"liul85","id":1312723,"avatar_url":"https://avatars.githubusercontent.com/u/1312723?v=3","gravatar_id":"","url":"https://api.github.com/users/liul85","html_url":"https://github.com/liul85","followers_url":"https://api.github.com/users/liul85/followers","following_url":"https://api.github.com/users/liul85/following{/other_user}","gists_url":"https://api.github.com/users/liul85/gists{/gist_id}","starred_url":"https://api.github.com/users/liul85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liul85/subscriptions","organizations_url":"https://api.github.com/users/liul85/orgs","repos_url":"https://api.github.com/users/liul85/repos","events_url":"https://api.github.com/users/liul85/events{/privacy}","received_events_url":"https://api.github.com/users/liul85/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liul85/daimaduan.com","description":"source code of daimaduan.com","fork":true,"url":"https://api.github.com/repos/liul85/daimaduan.com","forks_url":"https://api.github.com/repos/liul85/daimaduan.com/forks","keys_url":"https://api.github.com/repos/liul85/daimaduan.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liul85/daimaduan.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liul85/daimaduan.com/teams","hooks_url":"https://api.github.com/repos/liul85/daimaduan.com/hooks","issue_events_url":"https://api.github.com/repos/liul85/daimaduan.com/issues/events{/number}","events_url":"https://api.github.com/repos/liul85/daimaduan.com/events","assignees_url":"https://api.github.com/repos/liul85/daimaduan.com/assignees{/user}","branches_url":"https://api.github.com/repos/liul85/daimaduan.com/branches{/branch}","tags_url":"https://api.github.com/repos/liul85/daimaduan.com/tags","blobs_url":"https://api.github.com/repos/liul85/daimaduan.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liul85/daimaduan.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liul85/daimaduan.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/liul85/daimaduan.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liul85/daimaduan.com/statuses/{sha}","languages_url":"https://api.github.com/repos/liul85/daimaduan.com/languages","stargazers_url":"https://api.github.com/repos/liul85/daimaduan.com/stargazers","contributors_url":"https://api.github.com/repos/liul85/daimaduan.com/contributors","subscribers_url":"https://api.github.com/repos/liul85/daimaduan.com/subscribers","subscription_url":"https://api.github.com/repos/liul85/daimaduan.com/subscription","commits_url":"https://api.github.com/repos/liul85/daimaduan.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/liul85/daimaduan.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/liul85/daimaduan.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/liul85/daimaduan.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/liul85/daimaduan.com/contents/{+path}","compare_url":"https://api.github.com/repos/liul85/daimaduan.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liul85/daimaduan.com/merges","archive_url":"https://api.github.com/repos/liul85/daimaduan.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liul85/daimaduan.com/downloads","issues_url":"https://api.github.com/repos/liul85/daimaduan.com/issues{/number}","pulls_url":"https://api.github.com/repos/liul85/daimaduan.com/pulls{/number}","milestones_url":"https://api.github.com/repos/liul85/daimaduan.com/milestones{/number}","notifications_url":"https://api.github.com/repos/liul85/daimaduan.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liul85/daimaduan.com/labels{/name}","releases_url":"https://api.github.com/repos/liul85/daimaduan.com/releases{/id}","created_at":"2015-08-28T02:31:16Z","updated_at":"2015-08-28T02:31:16Z","pushed_at":"2015-10-14T14:26:19Z","git_url":"git://github.com/liul85/daimaduan.com.git","ssh_url":"git@github.com:liul85/daimaduan.com.git","clone_url":"https://github.com/liul85/daimaduan.com.git","svn_url":"https://github.com/liul85/daimaduan.com","homepage":null,"size":195,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DoubleCiti:master","ref":"master","sha":"4515c6ad9c0ced59f659b3349d9e23c8028764e8","user":{"login":"DoubleCiti","id":1917327,"avatar_url":"https://avatars.githubusercontent.com/u/1917327?v=3","gravatar_id":"","url":"https://api.github.com/users/DoubleCiti","html_url":"https://github.com/DoubleCiti","followers_url":"https://api.github.com/users/DoubleCiti/followers","following_url":"https://api.github.com/users/DoubleCiti/following{/other_user}","gists_url":"https://api.github.com/users/DoubleCiti/gists{/gist_id}","starred_url":"https://api.github.com/users/DoubleCiti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoubleCiti/subscriptions","organizations_url":"https://api.github.com/users/DoubleCiti/orgs","repos_url":"https://api.github.com/users/DoubleCiti/repos","events_url":"https://api.github.com/users/DoubleCiti/events{/privacy}","received_events_url":"https://api.github.com/users/DoubleCiti/received_events","type":"Organization","site_admin":false},"repo":{"id":41431760,"name":"daimaduan.com","full_name":"DoubleCiti/daimaduan.com","owner":{"login":"DoubleCiti","id":1917327,"avatar_url":"https://avatars.githubusercontent.com/u/1917327?v=3","gravatar_id":"","url":"https://api.github.com/users/DoubleCiti","html_url":"https://github.com/DoubleCiti","followers_url":"https://api.github.com/users/DoubleCiti/followers","following_url":"https://api.github.com/users/DoubleCiti/following{/other_user}","gists_url":"https://api.github.com/users/DoubleCiti/gists{/gist_id}","starred_url":"https://api.github.com/users/DoubleCiti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoubleCiti/subscriptions","organizations_url":"https://api.github.com/users/DoubleCiti/orgs","repos_url":"https://api.github.com/users/DoubleCiti/repos","events_url":"https://api.github.com/users/DoubleCiti/events{/privacy}","received_events_url":"https://api.github.com/users/DoubleCiti/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoubleCiti/daimaduan.com","description":"source code of daimaduan.com","fork":false,"url":"https://api.github.com/repos/DoubleCiti/daimaduan.com","forks_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/forks","keys_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/teams","hooks_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/hooks","issue_events_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/events{/number}","events_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/events","assignees_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/assignees{/user}","branches_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/branches{/branch}","tags_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/tags","blobs_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/statuses/{sha}","languages_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/languages","stargazers_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/stargazers","contributors_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/contributors","subscribers_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/subscribers","subscription_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/subscription","commits_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/contents/{+path}","compare_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/merges","archive_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/downloads","issues_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues{/number}","pulls_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls{/number}","milestones_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/milestones{/number}","notifications_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/labels{/name}","releases_url":"https://api.github.com/repos/DoubleCiti/daimaduan.com/releases{/id}","created_at":"2015-08-26T14:54:30Z","updated_at":"2015-08-26T14:59:25Z","pushed_at":"2015-10-14T14:27:56Z","git_url":"git://github.com/DoubleCiti/daimaduan.com.git","ssh_url":"git@github.com:DoubleCiti/daimaduan.com.git","clone_url":"https://github.com/DoubleCiti/daimaduan.com.git","svn_url":"https://github.com/DoubleCiti/daimaduan.com","homepage":null,"size":451,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30"},"html":{"href":"https://github.com/DoubleCiti/daimaduan.com/pull/30"},"issue":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/30"},"comments":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/DoubleCiti/daimaduan.com/statuses/f003684965ec020143ab0862c34b55df40cfa11b"}}}}