{"action":"created","comment":{"url":"https://api.github.com/repos/18F/regulations-site/pulls/comments/56988381","id":56988381,"diff_hunk":"@@ -47,14 +47,15 @@ def get(self, request, *args, **kwargs):\n             raise Http404\n \n         context = generate_html_tree(subtree)\n-        template = context['node']['template_name']\n         context['use_comments'] = True\n+        template = context['node']['template_name']\n \n+        context = {'sub_context': context, 'sub_template': template,\n+                   'preamble': preamble}\n         if not request.is_ajax() and request.GET.get('partial') != 'true':\n-            # Wrap the inner context\n-            context = {'sub_context': context, 'sub_template': template,\n-                       'preamble': preamble}\n             template = 'regulations/preamble-chrome.html'\n+        else:\n+            template = 'regulations/preamble-partial.html'","path":"regulations/views/preamble.py","position":16,"original_position":16,"commit_id":"91052f26021fe604ce2767034e67fd69bf4dca4b","original_commit_id":"91052f26021fe604ce2767034e67fd69bf4dca4b","user":{"login":"cmc333333","id":326918,"avatar_url":"https://avatars.githubusercontent.com/u/326918?v=3","gravatar_id":"","url":"https://api.github.com/users/cmc333333","html_url":"https://github.com/cmc333333","followers_url":"https://api.github.com/users/cmc333333/followers","following_url":"https://api.github.com/users/cmc333333/following{/other_user}","gists_url":"https://api.github.com/users/cmc333333/gists{/gist_id}","starred_url":"https://api.github.com/users/cmc333333/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmc333333/subscriptions","organizations_url":"https://api.github.com/users/cmc333333/orgs","repos_url":"https://api.github.com/users/cmc333333/repos","events_url":"https://api.github.com/users/cmc333333/events{/privacy}","received_events_url":"https://api.github.com/users/cmc333333/received_events","type":"User","site_admin":false},"body":"Mmm. Note that you're working against the existing system, here. The conception was that each node would _self_ describe the template which should render it. In this way, we can use that rendered template everywhere (not just when accepting comments, for example).\r\n\r\nIs there a reason not to keep the commenting markup within the chrome?","created_at":"2016-03-22T13:51:56Z","updated_at":"2016-03-22T13:51:56Z","html_url":"https://github.com/18F/regulations-site/pull/138#discussion_r56988381","pull_request_url":"https://api.github.com/repos/18F/regulations-site/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/comments/56988381"},"html":{"href":"https://github.com/18F/regulations-site/pull/138#discussion_r56988381"},"pull_request":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/18F/regulations-site/pulls/138","id":63668397,"html_url":"https://github.com/18F/regulations-site/pull/138","diff_url":"https://github.com/18F/regulations-site/pull/138.diff","patch_url":"https://github.com/18F/regulations-site/pull/138.patch","issue_url":"https://api.github.com/repos/18F/regulations-site/issues/138","number":138,"state":"open","locked":false,"title":"[WIP] Add AJAX navigation for preambles.","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"body":"This needs some cleanup, but it's far enough along for review in the meantime.","created_at":"2016-03-22T04:24:37Z","updated_at":"2016-03-22T13:51:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5c7f08fa426f106a20498cf16295559c054ca6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/regulations-site/pulls/138/commits","review_comments_url":"https://api.github.com/repos/18F/regulations-site/pulls/138/comments","review_comment_url":"https://api.github.com/repos/18F/regulations-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/regulations-site/issues/138/comments","statuses_url":"https://api.github.com/repos/18F/regulations-site/statuses/91052f26021fe604ce2767034e67fd69bf4dca4b","head":{"label":"jmcarp:ajax-preamble-nav","ref":"ajax-preamble-nav","sha":"91052f26021fe604ce2767034e67fd69bf4dca4b","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"repo":{"id":51460162,"name":"regulations-site","full_name":"jmcarp/regulations-site","owner":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmcarp/regulations-site","description":"All the code to present display regulations on the web. ","fork":true,"url":"https://api.github.com/repos/jmcarp/regulations-site","forks_url":"https://api.github.com/repos/jmcarp/regulations-site/forks","keys_url":"https://api.github.com/repos/jmcarp/regulations-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmcarp/regulations-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmcarp/regulations-site/teams","hooks_url":"https://api.github.com/repos/jmcarp/regulations-site/hooks","issue_events_url":"https://api.github.com/repos/jmcarp/regulations-site/issues/events{/number}","events_url":"https://api.github.com/repos/jmcarp/regulations-site/events","assignees_url":"https://api.github.com/repos/jmcarp/regulations-site/assignees{/user}","branches_url":"https://api.github.com/repos/jmcarp/regulations-site/branches{/branch}","tags_url":"https://api.github.com/repos/jmcarp/regulations-site/tags","blobs_url":"https://api.github.com/repos/jmcarp/regulations-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmcarp/regulations-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmcarp/regulations-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmcarp/regulations-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmcarp/regulations-site/statuses/{sha}","languages_url":"https://api.github.com/repos/jmcarp/regulations-site/languages","stargazers_url":"https://api.github.com/repos/jmcarp/regulations-site/stargazers","contributors_url":"https://api.github.com/repos/jmcarp/regulations-site/contributors","subscribers_url":"https://api.github.com/repos/jmcarp/regulations-site/subscribers","subscription_url":"https://api.github.com/repos/jmcarp/regulations-site/subscription","commits_url":"https://api.github.com/repos/jmcarp/regulations-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmcarp/regulations-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmcarp/regulations-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmcarp/regulations-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmcarp/regulations-site/contents/{+path}","compare_url":"https://api.github.com/repos/jmcarp/regulations-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmcarp/regulations-site/merges","archive_url":"https://api.github.com/repos/jmcarp/regulations-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmcarp/regulations-site/downloads","issues_url":"https://api.github.com/repos/jmcarp/regulations-site/issues{/number}","pulls_url":"https://api.github.com/repos/jmcarp/regulations-site/pulls{/number}","milestones_url":"https://api.github.com/repos/jmcarp/regulations-site/milestones{/number}","notifications_url":"https://api.github.com/repos/jmcarp/regulations-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmcarp/regulations-site/labels{/name}","releases_url":"https://api.github.com/repos/jmcarp/regulations-site/releases{/id}","deployments_url":"https://api.github.com/repos/jmcarp/regulations-site/deployments","created_at":"2016-02-10T18:03:48Z","updated_at":"2016-02-10T18:03:50Z","pushed_at":"2016-03-22T04:03:18Z","git_url":"git://github.com/jmcarp/regulations-site.git","ssh_url":"git@github.com:jmcarp/regulations-site.git","clone_url":"https://github.com/jmcarp/regulations-site.git","svn_url":"https://github.com/jmcarp/regulations-site","homepage":null,"size":14838,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"18F:master","ref":"master","sha":"334f5acf44a41a8a66ed1ae6f53c39242aac0ea2","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":27612781,"name":"regulations-site","full_name":"18F/regulations-site","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/regulations-site","description":"All the code to present display regulations on the web. ","fork":true,"url":"https://api.github.com/repos/18F/regulations-site","forks_url":"https://api.github.com/repos/18F/regulations-site/forks","keys_url":"https://api.github.com/repos/18F/regulations-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/regulations-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/regulations-site/teams","hooks_url":"https://api.github.com/repos/18F/regulations-site/hooks","issue_events_url":"https://api.github.com/repos/18F/regulations-site/issues/events{/number}","events_url":"https://api.github.com/repos/18F/regulations-site/events","assignees_url":"https://api.github.com/repos/18F/regulations-site/assignees{/user}","branches_url":"https://api.github.com/repos/18F/regulations-site/branches{/branch}","tags_url":"https://api.github.com/repos/18F/regulations-site/tags","blobs_url":"https://api.github.com/repos/18F/regulations-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/regulations-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/regulations-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/regulations-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/regulations-site/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/regulations-site/languages","stargazers_url":"https://api.github.com/repos/18F/regulations-site/stargazers","contributors_url":"https://api.github.com/repos/18F/regulations-site/contributors","subscribers_url":"https://api.github.com/repos/18F/regulations-site/subscribers","subscription_url":"https://api.github.com/repos/18F/regulations-site/subscription","commits_url":"https://api.github.com/repos/18F/regulations-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/regulations-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/regulations-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/regulations-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/regulations-site/contents/{+path}","compare_url":"https://api.github.com/repos/18F/regulations-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/regulations-site/merges","archive_url":"https://api.github.com/repos/18F/regulations-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/regulations-site/downloads","issues_url":"https://api.github.com/repos/18F/regulations-site/issues{/number}","pulls_url":"https://api.github.com/repos/18F/regulations-site/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/regulations-site/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/regulations-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/regulations-site/labels{/name}","releases_url":"https://api.github.com/repos/18F/regulations-site/releases{/id}","deployments_url":"https://api.github.com/repos/18F/regulations-site/deployments","created_at":"2014-12-05T22:22:40Z","updated_at":"2016-03-18T02:52:40Z","pushed_at":"2016-03-22T06:18:59Z","git_url":"git://github.com/18F/regulations-site.git","ssh_url":"git@github.com:18F/regulations-site.git","clone_url":"https://github.com/18F/regulations-site.git","svn_url":"https://github.com/18F/regulations-site","homepage":null,"size":14848,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":5,"forks":16,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/138"},"html":{"href":"https://github.com/18F/regulations-site/pull/138"},"issue":{"href":"https://api.github.com/repos/18F/regulations-site/issues/138"},"comments":{"href":"https://api.github.com/repos/18F/regulations-site/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/regulations-site/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/18F/regulations-site/statuses/91052f26021fe604ce2767034e67fd69bf4dca4b"}}}}