{"action":"created","comment":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/84208098","pull_request_review_id":4998768,"id":84208098,"diff_hunk":"@@ -1,18 +1,19 @@\n {% extends \"kolibri/base.html\" %}\n {% load learn_tags %}\n+{% load kolibri_tags %}\n \n {% block content %}\n+{% kolibri_bootstrap_collection 'channel' 'ChannelResource' %}\n   <script>","path":"kolibri/plugins/learn/templates/learn/learn.html","position":7,"original_position":7,"commit_id":"2cb9937694b3de4b284af3fc69977cb28969e55f","original_commit_id":"2cb9937694b3de4b284af3fc69977cb28969e55f","user":{"login":"indirectlylit","id":2367265,"avatar_url":"https://avatars.githubusercontent.com/u/2367265?v=3","gravatar_id":"","url":"https://api.github.com/users/indirectlylit","html_url":"https://github.com/indirectlylit","followers_url":"https://api.github.com/users/indirectlylit/followers","following_url":"https://api.github.com/users/indirectlylit/following{/other_user}","gists_url":"https://api.github.com/users/indirectlylit/gists{/gist_id}","starred_url":"https://api.github.com/users/indirectlylit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirectlylit/subscriptions","organizations_url":"https://api.github.com/users/indirectlylit/orgs","repos_url":"https://api.github.com/users/indirectlylit/repos","events_url":"https://api.github.com/users/indirectlylit/events{/privacy}","received_events_url":"https://api.github.com/users/indirectlylit/received_events","type":"User","site_admin":false},"body":"My intuition is that rather than having a special case for this particular model, it would be better to do it consistently.\r\n\r\nIt might actually be possible to do through the existing API - is there an API version of this lookup?\r\n\r\n```python\r\nContentNode.objects.get(parent__isnull=True)\r\n```\r\n\r\nIf not, we could possibly add a new API call specifically for the root node.\r\n\r\n(cc @jamalex )","created_at":"2016-10-20T03:33:33Z","updated_at":"2016-10-20T03:40:44Z","html_url":"https://github.com/learningequality/kolibri/pull/573#discussion_r84208098","pull_request_url":"https://api.github.com/repos/learningequality/kolibri/pulls/573","_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/84208098"},"html":{"href":"https://github.com/learningequality/kolibri/pull/573#discussion_r84208098"},"pull_request":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/573"}}},"pull_request":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/573","id":89265179,"html_url":"https://github.com/learningequality/kolibri/pull/573","diff_url":"https://github.com/learningequality/kolibri/pull/573.diff","patch_url":"https://github.com/learningequality/kolibri/pull/573.patch","issue_url":"https://api.github.com/repos/learningequality/kolibri/issues/573","number":573,"state":"open","locked":false,"title":"Standardized bootstrapping data.","user":{"login":"ralphiee22","id":6361732,"avatar_url":"https://avatars.githubusercontent.com/u/6361732?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphiee22","html_url":"https://github.com/ralphiee22","followers_url":"https://api.github.com/users/ralphiee22/followers","following_url":"https://api.github.com/users/ralphiee22/following{/other_user}","gists_url":"https://api.github.com/users/ralphiee22/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphiee22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphiee22/subscriptions","organizations_url":"https://api.github.com/users/ralphiee22/orgs","repos_url":"https://api.github.com/users/ralphiee22/repos","events_url":"https://api.github.com/users/ralphiee22/events{/privacy}","received_events_url":"https://api.github.com/users/ralphiee22/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nThis is an attempt at generalizing the bootstrapping of our data to the client side. I do find it a bit messy, but I tried to make it as generic as possible so the user just passes in the necessary parameters and it will handle the rest. I am opening up the floor for discussion on the implementation of this, and seeing if any improvements can be made. If we can agree on this implementation, then I can write documentation. \r\n\r\n## TODO\r\n\r\n- [ ] Have tests been written for the new code?\r\n- [ ] Has documentation been written/updated?\r\n\r\n## Reviewer guidance\r\n\r\nFor the parameters passed into the bootstrapping method, if a call needs to be made to the server, pass in the data prepended with `kwargs_`  \r\n\r\n\r\n## Documentation\r\n\r\nTo be written..\r\n\r\n## Screenshots (if appropriate)\r\n**Before** Accessing the learn page without bootstrapping.\r\n![screen shot 2016-10-13 at 11 50 07 am](https://cloud.githubusercontent.com/assets/6361732/19363027/b2137d74-913d-11e6-8617-bf1a1c72cc21.png)\r\n\r\n**After** bootstrapping the recommendations.\r\n![screen shot 2016-10-13 at 11 56 22 am](https://cloud.githubusercontent.com/assets/6361732/19363051/c0ee50d0-913d-11e6-8821-c0859d78edb2.png)\r\n\r\n\r\n\r\n","created_at":"2016-10-13T19:21:35Z","updated_at":"2016-10-20T03:40:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23d7f657cbfb54f1da3e63902e171ee65aba63ba","assignee":{"login":"aronasorman","id":191955,"avatar_url":"https://avatars.githubusercontent.com/u/191955?v=3","gravatar_id":"","url":"https://api.github.com/users/aronasorman","html_url":"https://github.com/aronasorman","followers_url":"https://api.github.com/users/aronasorman/followers","following_url":"https://api.github.com/users/aronasorman/following{/other_user}","gists_url":"https://api.github.com/users/aronasorman/gists{/gist_id}","starred_url":"https://api.github.com/users/aronasorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronasorman/subscriptions","organizations_url":"https://api.github.com/users/aronasorman/orgs","repos_url":"https://api.github.com/users/aronasorman/repos","events_url":"https://api.github.com/users/aronasorman/events{/privacy}","received_events_url":"https://api.github.com/users/aronasorman/received_events","type":"User","site_admin":false},"assignees":[{"login":"aronasorman","id":191955,"avatar_url":"https://avatars.githubusercontent.com/u/191955?v=3","gravatar_id":"","url":"https://api.github.com/users/aronasorman","html_url":"https://github.com/aronasorman","followers_url":"https://api.github.com/users/aronasorman/followers","following_url":"https://api.github.com/users/aronasorman/following{/other_user}","gists_url":"https://api.github.com/users/aronasorman/gists{/gist_id}","starred_url":"https://api.github.com/users/aronasorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronasorman/subscriptions","organizations_url":"https://api.github.com/users/aronasorman/orgs","repos_url":"https://api.github.com/users/aronasorman/repos","events_url":"https://api.github.com/users/aronasorman/events{/privacy}","received_events_url":"https://api.github.com/users/aronasorman/received_events","type":"User","site_admin":false},{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},{"login":"jamalex","id":618416,"avatar_url":"https://avatars.githubusercontent.com/u/618416?v=3","gravatar_id":"","url":"https://api.github.com/users/jamalex","html_url":"https://github.com/jamalex","followers_url":"https://api.github.com/users/jamalex/followers","following_url":"https://api.github.com/users/jamalex/following{/other_user}","gists_url":"https://api.github.com/users/jamalex/gists{/gist_id}","starred_url":"https://api.github.com/users/jamalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamalex/subscriptions","organizations_url":"https://api.github.com/users/jamalex/orgs","repos_url":"https://api.github.com/users/jamalex/repos","events_url":"https://api.github.com/users/jamalex/events{/privacy}","received_events_url":"https://api.github.com/users/jamalex/received_events","type":"User","site_admin":false},{"login":"indirectlylit","id":2367265,"avatar_url":"https://avatars.githubusercontent.com/u/2367265?v=3","gravatar_id":"","url":"https://api.github.com/users/indirectlylit","html_url":"https://github.com/indirectlylit","followers_url":"https://api.github.com/users/indirectlylit/followers","following_url":"https://api.github.com/users/indirectlylit/following{/other_user}","gists_url":"https://api.github.com/users/indirectlylit/gists{/gist_id}","starred_url":"https://api.github.com/users/indirectlylit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirectlylit/subscriptions","organizations_url":"https://api.github.com/users/indirectlylit/orgs","repos_url":"https://api.github.com/users/indirectlylit/repos","events_url":"https://api.github.com/users/indirectlylit/events{/privacy}","received_events_url":"https://api.github.com/users/indirectlylit/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/learningequality/kolibri/pulls/573/commits","review_comments_url":"https://api.github.com/repos/learningequality/kolibri/pulls/573/comments","review_comment_url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learningequality/kolibri/issues/573/comments","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/2cb9937694b3de4b284af3fc69977cb28969e55f","head":{"label":"ralphiee22:bootstrap_templates","ref":"bootstrap_templates","sha":"2cb9937694b3de4b284af3fc69977cb28969e55f","user":{"login":"ralphiee22","id":6361732,"avatar_url":"https://avatars.githubusercontent.com/u/6361732?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphiee22","html_url":"https://github.com/ralphiee22","followers_url":"https://api.github.com/users/ralphiee22/followers","following_url":"https://api.github.com/users/ralphiee22/following{/other_user}","gists_url":"https://api.github.com/users/ralphiee22/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphiee22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphiee22/subscriptions","organizations_url":"https://api.github.com/users/ralphiee22/orgs","repos_url":"https://api.github.com/users/ralphiee22/repos","events_url":"https://api.github.com/users/ralphiee22/events{/privacy}","received_events_url":"https://api.github.com/users/ralphiee22/received_events","type":"User","site_admin":false},"repo":{"id":61658796,"name":"kolibri","full_name":"ralphiee22/kolibri","owner":{"login":"ralphiee22","id":6361732,"avatar_url":"https://avatars.githubusercontent.com/u/6361732?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphiee22","html_url":"https://github.com/ralphiee22","followers_url":"https://api.github.com/users/ralphiee22/followers","following_url":"https://api.github.com/users/ralphiee22/following{/other_user}","gists_url":"https://api.github.com/users/ralphiee22/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphiee22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphiee22/subscriptions","organizations_url":"https://api.github.com/users/ralphiee22/orgs","repos_url":"https://api.github.com/users/ralphiee22/repos","events_url":"https://api.github.com/users/ralphiee22/events{/privacy}","received_events_url":"https://api.github.com/users/ralphiee22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ralphiee22/kolibri","description":"This is where Kolibri shall be born, watch and participate!","fork":true,"url":"https://api.github.com/repos/ralphiee22/kolibri","forks_url":"https://api.github.com/repos/ralphiee22/kolibri/forks","keys_url":"https://api.github.com/repos/ralphiee22/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ralphiee22/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ralphiee22/kolibri/teams","hooks_url":"https://api.github.com/repos/ralphiee22/kolibri/hooks","issue_events_url":"https://api.github.com/repos/ralphiee22/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/ralphiee22/kolibri/events","assignees_url":"https://api.github.com/repos/ralphiee22/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/ralphiee22/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/ralphiee22/kolibri/tags","blobs_url":"https://api.github.com/repos/ralphiee22/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ralphiee22/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ralphiee22/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/ralphiee22/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ralphiee22/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/ralphiee22/kolibri/languages","stargazers_url":"https://api.github.com/repos/ralphiee22/kolibri/stargazers","contributors_url":"https://api.github.com/repos/ralphiee22/kolibri/contributors","subscribers_url":"https://api.github.com/repos/ralphiee22/kolibri/subscribers","subscription_url":"https://api.github.com/repos/ralphiee22/kolibri/subscription","commits_url":"https://api.github.com/repos/ralphiee22/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/ralphiee22/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/ralphiee22/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/ralphiee22/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/ralphiee22/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/ralphiee22/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ralphiee22/kolibri/merges","archive_url":"https://api.github.com/repos/ralphiee22/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ralphiee22/kolibri/downloads","issues_url":"https://api.github.com/repos/ralphiee22/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/ralphiee22/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/ralphiee22/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/ralphiee22/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ralphiee22/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/ralphiee22/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/ralphiee22/kolibri/deployments","created_at":"2016-06-21T18:50:35Z","updated_at":"2016-06-21T18:50:36Z","pushed_at":"2016-10-19T16:59:59Z","git_url":"git://github.com/ralphiee22/kolibri.git","ssh_url":"git@github.com:ralphiee22/kolibri.git","clone_url":"https://github.com/ralphiee22/kolibri.git","svn_url":"https://github.com/ralphiee22/kolibri","homepage":"http://learningequality.org/kolibri/","size":8468,"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":"learningequality:develop","ref":"develop","sha":"870aa8cb0feb9926ef16814c482dcfae9873c89b","user":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"repo":{"id":49976939,"name":"kolibri","full_name":"learningequality/kolibri","owner":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learningequality/kolibri","description":"This is where Kolibri shall be born, watch and participate!","fork":false,"url":"https://api.github.com/repos/learningequality/kolibri","forks_url":"https://api.github.com/repos/learningequality/kolibri/forks","keys_url":"https://api.github.com/repos/learningequality/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learningequality/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learningequality/kolibri/teams","hooks_url":"https://api.github.com/repos/learningequality/kolibri/hooks","issue_events_url":"https://api.github.com/repos/learningequality/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/learningequality/kolibri/events","assignees_url":"https://api.github.com/repos/learningequality/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/learningequality/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/learningequality/kolibri/tags","blobs_url":"https://api.github.com/repos/learningequality/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learningequality/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learningequality/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/learningequality/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/learningequality/kolibri/languages","stargazers_url":"https://api.github.com/repos/learningequality/kolibri/stargazers","contributors_url":"https://api.github.com/repos/learningequality/kolibri/contributors","subscribers_url":"https://api.github.com/repos/learningequality/kolibri/subscribers","subscription_url":"https://api.github.com/repos/learningequality/kolibri/subscription","commits_url":"https://api.github.com/repos/learningequality/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/learningequality/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/learningequality/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/learningequality/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/learningequality/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/learningequality/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learningequality/kolibri/merges","archive_url":"https://api.github.com/repos/learningequality/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learningequality/kolibri/downloads","issues_url":"https://api.github.com/repos/learningequality/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/learningequality/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/learningequality/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/learningequality/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learningequality/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/learningequality/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/learningequality/kolibri/deployments","created_at":"2016-01-19T19:22:07Z","updated_at":"2016-09-20T00:16:36Z","pushed_at":"2016-10-20T02:21:04Z","git_url":"git://github.com/learningequality/kolibri.git","ssh_url":"git@github.com:learningequality/kolibri.git","clone_url":"https://github.com/learningequality/kolibri.git","svn_url":"https://github.com/learningequality/kolibri","homepage":"http://learningequality.org/kolibri/","size":10667,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":46,"forks":35,"open_issues":46,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/573"},"html":{"href":"https://github.com/learningequality/kolibri/pull/573"},"issue":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/573"},"comments":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/573/comments"},"review_comments":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/573/comments"},"review_comment":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/573/commits"},"statuses":{"href":"https://api.github.com/repos/learningequality/kolibri/statuses/2cb9937694b3de4b284af3fc69977cb28969e55f"}}}}
{"actor":{"display_login":"indirectlylit"}}