{"action":"created","comment":{"url":"https://api.github.com/repos/django/djangoproject.com/pulls/comments/27594652","id":27594652,"diff_hunk":"@@ -0,0 +1,22 @@\n+from django import template\n+\n+from django_hosts.resolvers import reverse\n+\n+register = template.Library()\n+\n+\n+@register.simple_tag()\n+def release_notes(version, text=''):\n+    version_x_dot_y = version[:3]\n+    is_pre_release = any(c in version for c in ('a', 'b', 'c'))\n+    # links for prereleases don't have their own release notes\n+    display_version = version_x_dot_y if is_pre_release else version\n+    release_notes_path = 'releases/%s' % display_version\n+    return '<a href=\"%s\">%s</a>' % (\n+        reverse(\n+            'document-detail',\n+            host='docs',\n+            kwargs={'lang': 'en', 'version': version_x_dot_y, 'url': release_notes_path},\n+        ),\n+        text if text else ('%s release notes' % display_version),","path":"releases/templatetags/release_notes.py","position":21,"original_position":21,"commit_id":"cf991ef206ea6120d143d1e381b45d645b4a4f98","original_commit_id":"cf991ef206ea6120d143d1e381b45d645b4a4f98","user":{"login":"jezdez","id":1610,"avatar_url":"https://avatars.githubusercontent.com/u/1610?v=3","gravatar_id":"","url":"https://api.github.com/users/jezdez","html_url":"https://github.com/jezdez","followers_url":"https://api.github.com/users/jezdez/followers","following_url":"https://api.github.com/users/jezdez/following{/other_user}","gists_url":"https://api.github.com/users/jezdez/gists{/gist_id}","starred_url":"https://api.github.com/users/jezdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jezdez/subscriptions","organizations_url":"https://api.github.com/users/jezdez/orgs","repos_url":"https://api.github.com/users/jezdez/repos","events_url":"https://api.github.com/users/jezdez/events{/privacy}","received_events_url":"https://api.github.com/users/jezdez/received_events","type":"User","site_admin":false},"body":"Understood, works for me, I was just curious.","created_at":"2015-04-01T18:07:06Z","updated_at":"2015-04-01T18:07:06Z","html_url":"https://github.com/django/djangoproject.com/pull/424#discussion_r27594652","pull_request_url":"https://api.github.com/repos/django/djangoproject.com/pulls/424","_links":{"self":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/comments/27594652"},"html":{"href":"https://github.com/django/djangoproject.com/pull/424#discussion_r27594652"},"pull_request":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/424"}}},"pull_request":{"url":"https://api.github.com/repos/django/djangoproject.com/pulls/424","id":32428974,"html_url":"https://github.com/django/djangoproject.com/pull/424","diff_url":"https://github.com/django/djangoproject.com/pull/424.diff","patch_url":"https://github.com/django/djangoproject.com/pull/424.patch","issue_url":"https://api.github.com/repos/django/djangoproject.com/issues/424","number":424,"state":"open","locked":false,"title":"Fixed #390 -- Added release notes links to download page.","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-01T15:18:38Z","updated_at":"2015-04-01T18:07:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f218e540befd6d51bb7f4e9de0413218f73c3184","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/djangoproject.com/pulls/424/commits","review_comments_url":"https://api.github.com/repos/django/djangoproject.com/pulls/424/comments","review_comment_url":"https://api.github.com/repos/django/djangoproject.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/djangoproject.com/issues/424/comments","statuses_url":"https://api.github.com/repos/django/djangoproject.com/statuses/cf991ef206ea6120d143d1e381b45d645b4a4f98","head":{"label":"timgraham:release-notes-links","ref":"release-notes-links","sha":"cf991ef206ea6120d143d1e381b45d645b4a4f98","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"repo":{"id":16510963,"name":"djangoproject.com","full_name":"timgraham/djangoproject.com","owner":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timgraham/djangoproject.com","description":"Source code to djangoproject.com","fork":true,"url":"https://api.github.com/repos/timgraham/djangoproject.com","forks_url":"https://api.github.com/repos/timgraham/djangoproject.com/forks","keys_url":"https://api.github.com/repos/timgraham/djangoproject.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timgraham/djangoproject.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timgraham/djangoproject.com/teams","hooks_url":"https://api.github.com/repos/timgraham/djangoproject.com/hooks","issue_events_url":"https://api.github.com/repos/timgraham/djangoproject.com/issues/events{/number}","events_url":"https://api.github.com/repos/timgraham/djangoproject.com/events","assignees_url":"https://api.github.com/repos/timgraham/djangoproject.com/assignees{/user}","branches_url":"https://api.github.com/repos/timgraham/djangoproject.com/branches{/branch}","tags_url":"https://api.github.com/repos/timgraham/djangoproject.com/tags","blobs_url":"https://api.github.com/repos/timgraham/djangoproject.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timgraham/djangoproject.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timgraham/djangoproject.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/timgraham/djangoproject.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timgraham/djangoproject.com/statuses/{sha}","languages_url":"https://api.github.com/repos/timgraham/djangoproject.com/languages","stargazers_url":"https://api.github.com/repos/timgraham/djangoproject.com/stargazers","contributors_url":"https://api.github.com/repos/timgraham/djangoproject.com/contributors","subscribers_url":"https://api.github.com/repos/timgraham/djangoproject.com/subscribers","subscription_url":"https://api.github.com/repos/timgraham/djangoproject.com/subscription","commits_url":"https://api.github.com/repos/timgraham/djangoproject.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/timgraham/djangoproject.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/timgraham/djangoproject.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/timgraham/djangoproject.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/timgraham/djangoproject.com/contents/{+path}","compare_url":"https://api.github.com/repos/timgraham/djangoproject.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timgraham/djangoproject.com/merges","archive_url":"https://api.github.com/repos/timgraham/djangoproject.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timgraham/djangoproject.com/downloads","issues_url":"https://api.github.com/repos/timgraham/djangoproject.com/issues{/number}","pulls_url":"https://api.github.com/repos/timgraham/djangoproject.com/pulls{/number}","milestones_url":"https://api.github.com/repos/timgraham/djangoproject.com/milestones{/number}","notifications_url":"https://api.github.com/repos/timgraham/djangoproject.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timgraham/djangoproject.com/labels{/name}","releases_url":"https://api.github.com/repos/timgraham/djangoproject.com/releases{/id}","created_at":"2014-02-04T12:24:34Z","updated_at":"2014-02-05T00:41:05Z","pushed_at":"2015-04-01T17:50:46Z","git_url":"git://github.com/timgraham/djangoproject.com.git","ssh_url":"git@github.com:timgraham/djangoproject.com.git","clone_url":"https://github.com/timgraham/djangoproject.com.git","svn_url":"https://github.com/timgraham/djangoproject.com","homepage":"http://djangoproject.com/","size":2721,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"django:master","ref":"master","sha":"7e2508e3e3243840382d13f57c8cda975c6cf476","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":690903,"name":"djangoproject.com","full_name":"django/djangoproject.com","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/djangoproject.com","description":"Source code to djangoproject.com","fork":false,"url":"https://api.github.com/repos/django/djangoproject.com","forks_url":"https://api.github.com/repos/django/djangoproject.com/forks","keys_url":"https://api.github.com/repos/django/djangoproject.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/djangoproject.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/djangoproject.com/teams","hooks_url":"https://api.github.com/repos/django/djangoproject.com/hooks","issue_events_url":"https://api.github.com/repos/django/djangoproject.com/issues/events{/number}","events_url":"https://api.github.com/repos/django/djangoproject.com/events","assignees_url":"https://api.github.com/repos/django/djangoproject.com/assignees{/user}","branches_url":"https://api.github.com/repos/django/djangoproject.com/branches{/branch}","tags_url":"https://api.github.com/repos/django/djangoproject.com/tags","blobs_url":"https://api.github.com/repos/django/djangoproject.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/djangoproject.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/djangoproject.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/djangoproject.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/djangoproject.com/statuses/{sha}","languages_url":"https://api.github.com/repos/django/djangoproject.com/languages","stargazers_url":"https://api.github.com/repos/django/djangoproject.com/stargazers","contributors_url":"https://api.github.com/repos/django/djangoproject.com/contributors","subscribers_url":"https://api.github.com/repos/django/djangoproject.com/subscribers","subscription_url":"https://api.github.com/repos/django/djangoproject.com/subscription","commits_url":"https://api.github.com/repos/django/djangoproject.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/djangoproject.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/djangoproject.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/djangoproject.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/djangoproject.com/contents/{+path}","compare_url":"https://api.github.com/repos/django/djangoproject.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/djangoproject.com/merges","archive_url":"https://api.github.com/repos/django/djangoproject.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/djangoproject.com/downloads","issues_url":"https://api.github.com/repos/django/djangoproject.com/issues{/number}","pulls_url":"https://api.github.com/repos/django/djangoproject.com/pulls{/number}","milestones_url":"https://api.github.com/repos/django/djangoproject.com/milestones{/number}","notifications_url":"https://api.github.com/repos/django/djangoproject.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/djangoproject.com/labels{/name}","releases_url":"https://api.github.com/repos/django/djangoproject.com/releases{/id}","created_at":"2010-05-28T11:27:09Z","updated_at":"2015-04-01T17:24:48Z","pushed_at":"2015-04-01T17:51:19Z","git_url":"git://github.com/django/djangoproject.com.git","ssh_url":"git@github.com:django/djangoproject.com.git","clone_url":"https://github.com/django/djangoproject.com.git","svn_url":"https://github.com/django/djangoproject.com","homepage":"https://www.djangoproject.com/","size":17977,"stargazers_count":445,"watchers_count":445,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":179,"mirror_url":null,"open_issues_count":45,"forks":179,"open_issues":45,"watchers":445,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/424"},"html":{"href":"https://github.com/django/djangoproject.com/pull/424"},"issue":{"href":"https://api.github.com/repos/django/djangoproject.com/issues/424"},"comments":{"href":"https://api.github.com/repos/django/djangoproject.com/issues/424/comments"},"review_comments":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/424/comments"},"review_comment":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/djangoproject.com/pulls/424/commits"},"statuses":{"href":"https://api.github.com/repos/django/djangoproject.com/statuses/cf991ef206ea6120d143d1e381b45d645b4a4f98"}}}}