{"action":"created","comment":{"url":"https://api.github.com/repos/iiitv/Odyssy/pulls/comments/118152240","pull_request_review_id":39916921,"id":118152240,"diff_hunk":"@@ -0,0 +1,40 @@\n+from django.core.paginator import Paginator, EmptyPage\n+from django.shortcuts import render\n+from django.db.models import Q\n+\n+from .models import Announcement\n+import datetime\n+\n+# Create your views here.\n+def index(request):\n+    announcements = Announcement.objects.all().order_by('-initDate')\n+    paginator = Paginator(announcements, 10)\n+\n+    page = request.GET.get('page', default=1)\n+    try:\n+        announcements = paginator.page(page)\n+    except EmptyPage:\n+        announcements = paginator.page(paginator.num_pages)\n+    context = {\n+        'announcement_list': announcements,\n+        }\n+    return render(request, 'announcement/index.html', context)\n+\n+\n+def open_view(request, announcement_id):\n+    announcement = Announcement.objects.filter(key=announcement_id)\n+    if announcement:\n+        announcement = announcement.get()\n+    else:\n+        announcement = None\n+    context = {\n+        'info': announcement,\n+        }\n+    return render(request, 'announcement/info.html', context)\n+\n+def latest_announcement(cnt):","path":"wsgi/odyssy/announcement/views.py","position":35,"original_position":35,"commit_id":"43c506072a542d40480891141e81617d2ffbbd95","original_commit_id":"43c506072a542d40480891141e81617d2ffbbd95","user":{"login":"singhpratyush","id":10860278,"avatar_url":"https://avatars2.githubusercontent.com/u/10860278?v=3","gravatar_id":"","url":"https://api.github.com/users/singhpratyush","html_url":"https://github.com/singhpratyush","followers_url":"https://api.github.com/users/singhpratyush/followers","following_url":"https://api.github.com/users/singhpratyush/following{/other_user}","gists_url":"https://api.github.com/users/singhpratyush/gists{/gist_id}","starred_url":"https://api.github.com/users/singhpratyush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singhpratyush/subscriptions","organizations_url":"https://api.github.com/users/singhpratyush/orgs","repos_url":"https://api.github.com/users/singhpratyush/repos","events_url":"https://api.github.com/users/singhpratyush/events{/privacy}","received_events_url":"https://api.github.com/users/singhpratyush/received_events","type":"User","site_admin":false},"body":"Please add all such methods as `staticmethod` to `Announcement` class. See `events` class for reference.","created_at":"2017-05-24T02:49:12Z","updated_at":"2017-05-24T02:53:41Z","html_url":"https://github.com/iiitv/Odyssy/pull/17#discussion_r118152240","pull_request_url":"https://api.github.com/repos/iiitv/Odyssy/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/comments/118152240"},"html":{"href":"https://github.com/iiitv/Odyssy/pull/17#discussion_r118152240"},"pull_request":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/iiitv/Odyssy/pulls/17","id":121722459,"html_url":"https://github.com/iiitv/Odyssy/pull/17","diff_url":"https://github.com/iiitv/Odyssy/pull/17.diff","patch_url":"https://github.com/iiitv/Odyssy/pull/17.patch","issue_url":"https://api.github.com/repos/iiitv/Odyssy/issues/17","number":17,"state":"open","locked":false,"title":"Added announcements app","user":{"login":"yashLadha","id":18033231,"avatar_url":"https://avatars0.githubusercontent.com/u/18033231?v=3","gravatar_id":"","url":"https://api.github.com/users/yashLadha","html_url":"https://github.com/yashLadha","followers_url":"https://api.github.com/users/yashLadha/followers","following_url":"https://api.github.com/users/yashLadha/following{/other_user}","gists_url":"https://api.github.com/users/yashLadha/gists{/gist_id}","starred_url":"https://api.github.com/users/yashLadha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashLadha/subscriptions","organizations_url":"https://api.github.com/users/yashLadha/orgs","repos_url":"https://api.github.com/users/yashLadha/repos","events_url":"https://api.github.com/users/yashLadha/events{/privacy}","received_events_url":"https://api.github.com/users/yashLadha/received_events","type":"User","site_admin":false},"body":"closes https://github.com/iiitv/Odyssy/issues/2","created_at":"2017-05-22T08:25:17Z","updated_at":"2017-05-24T02:53:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d1e5ff23d248b071d8aee34715bee47c0751ae8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/iiitv/Odyssy/pulls/17/commits","review_comments_url":"https://api.github.com/repos/iiitv/Odyssy/pulls/17/comments","review_comment_url":"https://api.github.com/repos/iiitv/Odyssy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iiitv/Odyssy/issues/17/comments","statuses_url":"https://api.github.com/repos/iiitv/Odyssy/statuses/43c506072a542d40480891141e81617d2ffbbd95","head":{"label":"yashLadha:Issue-2","ref":"Issue-2","sha":"43c506072a542d40480891141e81617d2ffbbd95","user":{"login":"yashLadha","id":18033231,"avatar_url":"https://avatars0.githubusercontent.com/u/18033231?v=3","gravatar_id":"","url":"https://api.github.com/users/yashLadha","html_url":"https://github.com/yashLadha","followers_url":"https://api.github.com/users/yashLadha/followers","following_url":"https://api.github.com/users/yashLadha/following{/other_user}","gists_url":"https://api.github.com/users/yashLadha/gists{/gist_id}","starred_url":"https://api.github.com/users/yashLadha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashLadha/subscriptions","organizations_url":"https://api.github.com/users/yashLadha/orgs","repos_url":"https://api.github.com/users/yashLadha/repos","events_url":"https://api.github.com/users/yashLadha/events{/privacy}","received_events_url":"https://api.github.com/users/yashLadha/received_events","type":"User","site_admin":false},"repo":{"id":91665843,"name":"Odyssy","full_name":"yashLadha/Odyssy","owner":{"login":"yashLadha","id":18033231,"avatar_url":"https://avatars0.githubusercontent.com/u/18033231?v=3","gravatar_id":"","url":"https://api.github.com/users/yashLadha","html_url":"https://github.com/yashLadha","followers_url":"https://api.github.com/users/yashLadha/followers","following_url":"https://api.github.com/users/yashLadha/following{/other_user}","gists_url":"https://api.github.com/users/yashLadha/gists{/gist_id}","starred_url":"https://api.github.com/users/yashLadha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashLadha/subscriptions","organizations_url":"https://api.github.com/users/yashLadha/orgs","repos_url":"https://api.github.com/users/yashLadha/repos","events_url":"https://api.github.com/users/yashLadha/events{/privacy}","received_events_url":"https://api.github.com/users/yashLadha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yashLadha/Odyssy","description":null,"fork":true,"url":"https://api.github.com/repos/yashLadha/Odyssy","forks_url":"https://api.github.com/repos/yashLadha/Odyssy/forks","keys_url":"https://api.github.com/repos/yashLadha/Odyssy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yashLadha/Odyssy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yashLadha/Odyssy/teams","hooks_url":"https://api.github.com/repos/yashLadha/Odyssy/hooks","issue_events_url":"https://api.github.com/repos/yashLadha/Odyssy/issues/events{/number}","events_url":"https://api.github.com/repos/yashLadha/Odyssy/events","assignees_url":"https://api.github.com/repos/yashLadha/Odyssy/assignees{/user}","branches_url":"https://api.github.com/repos/yashLadha/Odyssy/branches{/branch}","tags_url":"https://api.github.com/repos/yashLadha/Odyssy/tags","blobs_url":"https://api.github.com/repos/yashLadha/Odyssy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yashLadha/Odyssy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yashLadha/Odyssy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yashLadha/Odyssy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yashLadha/Odyssy/statuses/{sha}","languages_url":"https://api.github.com/repos/yashLadha/Odyssy/languages","stargazers_url":"https://api.github.com/repos/yashLadha/Odyssy/stargazers","contributors_url":"https://api.github.com/repos/yashLadha/Odyssy/contributors","subscribers_url":"https://api.github.com/repos/yashLadha/Odyssy/subscribers","subscription_url":"https://api.github.com/repos/yashLadha/Odyssy/subscription","commits_url":"https://api.github.com/repos/yashLadha/Odyssy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yashLadha/Odyssy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yashLadha/Odyssy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yashLadha/Odyssy/issues/comments{/number}","contents_url":"https://api.github.com/repos/yashLadha/Odyssy/contents/{+path}","compare_url":"https://api.github.com/repos/yashLadha/Odyssy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yashLadha/Odyssy/merges","archive_url":"https://api.github.com/repos/yashLadha/Odyssy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yashLadha/Odyssy/downloads","issues_url":"https://api.github.com/repos/yashLadha/Odyssy/issues{/number}","pulls_url":"https://api.github.com/repos/yashLadha/Odyssy/pulls{/number}","milestones_url":"https://api.github.com/repos/yashLadha/Odyssy/milestones{/number}","notifications_url":"https://api.github.com/repos/yashLadha/Odyssy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yashLadha/Odyssy/labels{/name}","releases_url":"https://api.github.com/repos/yashLadha/Odyssy/releases{/id}","deployments_url":"https://api.github.com/repos/yashLadha/Odyssy/deployments","created_at":"2017-05-18T08:03:26Z","updated_at":"2017-05-18T08:03:30Z","pushed_at":"2017-05-23T20:37:21Z","git_url":"git://github.com/yashLadha/Odyssy.git","ssh_url":"git@github.com:yashLadha/Odyssy.git","clone_url":"https://github.com/yashLadha/Odyssy.git","svn_url":"https://github.com/yashLadha/Odyssy","homepage":"https://odyssy.singhpratyush.in/","size":230,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"iiitv:master","ref":"master","sha":"f7d8a43e9531b357ba967d6cf07bdbafdca5a816","user":{"login":"iiitv","id":9347727,"avatar_url":"https://avatars2.githubusercontent.com/u/9347727?v=3","gravatar_id":"","url":"https://api.github.com/users/iiitv","html_url":"https://github.com/iiitv","followers_url":"https://api.github.com/users/iiitv/followers","following_url":"https://api.github.com/users/iiitv/following{/other_user}","gists_url":"https://api.github.com/users/iiitv/gists{/gist_id}","starred_url":"https://api.github.com/users/iiitv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iiitv/subscriptions","organizations_url":"https://api.github.com/users/iiitv/orgs","repos_url":"https://api.github.com/users/iiitv/repos","events_url":"https://api.github.com/users/iiitv/events{/privacy}","received_events_url":"https://api.github.com/users/iiitv/received_events","type":"Organization","site_admin":false},"repo":{"id":91192604,"name":"Odyssy","full_name":"iiitv/Odyssy","owner":{"login":"iiitv","id":9347727,"avatar_url":"https://avatars2.githubusercontent.com/u/9347727?v=3","gravatar_id":"","url":"https://api.github.com/users/iiitv","html_url":"https://github.com/iiitv","followers_url":"https://api.github.com/users/iiitv/followers","following_url":"https://api.github.com/users/iiitv/following{/other_user}","gists_url":"https://api.github.com/users/iiitv/gists{/gist_id}","starred_url":"https://api.github.com/users/iiitv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iiitv/subscriptions","organizations_url":"https://api.github.com/users/iiitv/orgs","repos_url":"https://api.github.com/users/iiitv/repos","events_url":"https://api.github.com/users/iiitv/events{/privacy}","received_events_url":"https://api.github.com/users/iiitv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iiitv/Odyssy","description":null,"fork":false,"url":"https://api.github.com/repos/iiitv/Odyssy","forks_url":"https://api.github.com/repos/iiitv/Odyssy/forks","keys_url":"https://api.github.com/repos/iiitv/Odyssy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iiitv/Odyssy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iiitv/Odyssy/teams","hooks_url":"https://api.github.com/repos/iiitv/Odyssy/hooks","issue_events_url":"https://api.github.com/repos/iiitv/Odyssy/issues/events{/number}","events_url":"https://api.github.com/repos/iiitv/Odyssy/events","assignees_url":"https://api.github.com/repos/iiitv/Odyssy/assignees{/user}","branches_url":"https://api.github.com/repos/iiitv/Odyssy/branches{/branch}","tags_url":"https://api.github.com/repos/iiitv/Odyssy/tags","blobs_url":"https://api.github.com/repos/iiitv/Odyssy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iiitv/Odyssy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iiitv/Odyssy/git/refs{/sha}","trees_url":"https://api.github.com/repos/iiitv/Odyssy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iiitv/Odyssy/statuses/{sha}","languages_url":"https://api.github.com/repos/iiitv/Odyssy/languages","stargazers_url":"https://api.github.com/repos/iiitv/Odyssy/stargazers","contributors_url":"https://api.github.com/repos/iiitv/Odyssy/contributors","subscribers_url":"https://api.github.com/repos/iiitv/Odyssy/subscribers","subscription_url":"https://api.github.com/repos/iiitv/Odyssy/subscription","commits_url":"https://api.github.com/repos/iiitv/Odyssy/commits{/sha}","git_commits_url":"https://api.github.com/repos/iiitv/Odyssy/git/commits{/sha}","comments_url":"https://api.github.com/repos/iiitv/Odyssy/comments{/number}","issue_comment_url":"https://api.github.com/repos/iiitv/Odyssy/issues/comments{/number}","contents_url":"https://api.github.com/repos/iiitv/Odyssy/contents/{+path}","compare_url":"https://api.github.com/repos/iiitv/Odyssy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iiitv/Odyssy/merges","archive_url":"https://api.github.com/repos/iiitv/Odyssy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iiitv/Odyssy/downloads","issues_url":"https://api.github.com/repos/iiitv/Odyssy/issues{/number}","pulls_url":"https://api.github.com/repos/iiitv/Odyssy/pulls{/number}","milestones_url":"https://api.github.com/repos/iiitv/Odyssy/milestones{/number}","notifications_url":"https://api.github.com/repos/iiitv/Odyssy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iiitv/Odyssy/labels{/name}","releases_url":"https://api.github.com/repos/iiitv/Odyssy/releases{/id}","deployments_url":"https://api.github.com/repos/iiitv/Odyssy/deployments","created_at":"2017-05-13T17:49:22Z","updated_at":"2017-05-23T23:41:38Z","pushed_at":"2017-05-23T22:20:42Z","git_url":"git://github.com/iiitv/Odyssy.git","ssh_url":"git@github.com:iiitv/Odyssy.git","clone_url":"https://github.com/iiitv/Odyssy.git","svn_url":"https://github.com/iiitv/Odyssy","homepage":"https://odyssy.singhpratyush.in/","size":213,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":14,"forks":7,"open_issues":14,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/17"},"html":{"href":"https://github.com/iiitv/Odyssy/pull/17"},"issue":{"href":"https://api.github.com/repos/iiitv/Odyssy/issues/17"},"comments":{"href":"https://api.github.com/repos/iiitv/Odyssy/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iiitv/Odyssy/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/iiitv/Odyssy/statuses/43c506072a542d40480891141e81617d2ffbbd95"}}}}
{"actor":{"display_login":"singhpratyush"}}