{"action":"created","comment":{"url":"https://api.github.com/repos/divio/django-cms/pulls/comments/72233327","id":72233327,"diff_hunk":"@@ -60,49 +49,34 @@ Create a new ``cms_toolbars.py`` file in your Polls/CMS Integration application:\n                 url=admin_reverse('polls_poll_add'),\n             )\n \n+\n+    toolbar_pool.register(PollToolbar)  # register the toolbar\n+\n+\n .. note:: Don't forget to restart the runserver to have your new toolbar item recognised.\n \n \n What this all means\n ===================\n \n-Right now you don't need to know exactly what this does, but once you've got it working here's\n-a quick run-down what the code above does:\n \n-* defines a ``CMSToolbar`` sub-class\n-* registers the toolbar class with ``@toolbar_pool.register``\n-* defines a ``populate()`` method that adds an item to the menu\n-\n-The ``populate()`` method:\n+``CMSToolbar`` sub-classes must implement a ``populate()`` method. The ``populate()`` method will only be called if the\n+current user is a staff user. The ``populate()`` method is what actually manages the toolbar - it:","path":"docs/introduction/toolbar.rst","position":66,"original_position":66,"commit_id":"53ff1b19215bee7767584b92fb495a78431b46bc","original_commit_id":"53ff1b19215bee7767584b92fb495a78431b46bc","user":{"login":"czpython","id":994951,"avatar_url":"https://avatars.githubusercontent.com/u/994951?v=3","gravatar_id":"","url":"https://api.github.com/users/czpython","html_url":"https://github.com/czpython","followers_url":"https://api.github.com/users/czpython/followers","following_url":"https://api.github.com/users/czpython/following{/other_user}","gists_url":"https://api.github.com/users/czpython/gists{/gist_id}","starred_url":"https://api.github.com/users/czpython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czpython/subscriptions","organizations_url":"https://api.github.com/users/czpython/orgs","repos_url":"https://api.github.com/users/czpython/repos","events_url":"https://api.github.com/users/czpython/events{/privacy}","received_events_url":"https://api.github.com/users/czpython/received_events","type":"User","site_admin":false},"body":"maybe would be good to clarify \"method is what actually manages the toolbar - it:\" to say \"method is what actually manages the toolbar - in our case, it will:\"\r\n\r\nReading through it, was a bit confusing to see the poll app specific stuff in `populate()`.","created_at":"2016-07-26T11:47:07Z","updated_at":"2016-07-26T11:47:07Z","html_url":"https://github.com/divio/django-cms/pull/5544#discussion_r72233327","pull_request_url":"https://api.github.com/repos/divio/django-cms/pulls/5544","_links":{"self":{"href":"https://api.github.com/repos/divio/django-cms/pulls/comments/72233327"},"html":{"href":"https://github.com/divio/django-cms/pull/5544#discussion_r72233327"},"pull_request":{"href":"https://api.github.com/repos/divio/django-cms/pulls/5544"}}},"pull_request":{"url":"https://api.github.com/repos/divio/django-cms/pulls/5544","id":77602189,"html_url":"https://github.com/divio/django-cms/pull/5544","diff_url":"https://github.com/divio/django-cms/pull/5544.diff","patch_url":"https://github.com/divio/django-cms/pull/5544.patch","issue_url":"https://api.github.com/repos/divio/django-cms/issues/5544","number":5544,"state":"open","locked":false,"title":"Simplified and improved toolbar tutorial","user":{"login":"evildmp","id":86222,"avatar_url":"https://avatars.githubusercontent.com/u/86222?v=3","gravatar_id":"","url":"https://api.github.com/users/evildmp","html_url":"https://github.com/evildmp","followers_url":"https://api.github.com/users/evildmp/followers","following_url":"https://api.github.com/users/evildmp/following{/other_user}","gists_url":"https://api.github.com/users/evildmp/gists{/gist_id}","starred_url":"https://api.github.com/users/evildmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildmp/subscriptions","organizations_url":"https://api.github.com/users/evildmp/orgs","repos_url":"https://api.github.com/users/evildmp/repos","events_url":"https://api.github.com/users/evildmp/events{/privacy}","received_events_url":"https://api.github.com/users/evildmp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-15T11:34:20Z","updated_at":"2016-07-26T11:47:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7c79a4aa8587502796a9780b2697f7f92c15944","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/divio/django-cms/pulls/5544/commits","review_comments_url":"https://api.github.com/repos/divio/django-cms/pulls/5544/comments","review_comment_url":"https://api.github.com/repos/divio/django-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/divio/django-cms/issues/5544/comments","statuses_url":"https://api.github.com/repos/divio/django-cms/statuses/53ff1b19215bee7767584b92fb495a78431b46bc","head":{"label":"evildmp:docs-improve-toolbar-intro","ref":"docs-improve-toolbar-intro","sha":"53ff1b19215bee7767584b92fb495a78431b46bc","user":{"login":"evildmp","id":86222,"avatar_url":"https://avatars.githubusercontent.com/u/86222?v=3","gravatar_id":"","url":"https://api.github.com/users/evildmp","html_url":"https://github.com/evildmp","followers_url":"https://api.github.com/users/evildmp/followers","following_url":"https://api.github.com/users/evildmp/following{/other_user}","gists_url":"https://api.github.com/users/evildmp/gists{/gist_id}","starred_url":"https://api.github.com/users/evildmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildmp/subscriptions","organizations_url":"https://api.github.com/users/evildmp/orgs","repos_url":"https://api.github.com/users/evildmp/repos","events_url":"https://api.github.com/users/evildmp/events{/privacy}","received_events_url":"https://api.github.com/users/evildmp/received_events","type":"User","site_admin":false},"repo":{"id":1870038,"name":"django-cms","full_name":"evildmp/django-cms","owner":{"login":"evildmp","id":86222,"avatar_url":"https://avatars.githubusercontent.com/u/86222?v=3","gravatar_id":"","url":"https://api.github.com/users/evildmp","html_url":"https://github.com/evildmp","followers_url":"https://api.github.com/users/evildmp/followers","following_url":"https://api.github.com/users/evildmp/following{/other_user}","gists_url":"https://api.github.com/users/evildmp/gists{/gist_id}","starred_url":"https://api.github.com/users/evildmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildmp/subscriptions","organizations_url":"https://api.github.com/users/evildmp/orgs","repos_url":"https://api.github.com/users/evildmp/repos","events_url":"https://api.github.com/users/evildmp/events{/privacy}","received_events_url":"https://api.github.com/users/evildmp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evildmp/django-cms","description":"An Advanced Django CMS.","fork":true,"url":"https://api.github.com/repos/evildmp/django-cms","forks_url":"https://api.github.com/repos/evildmp/django-cms/forks","keys_url":"https://api.github.com/repos/evildmp/django-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evildmp/django-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evildmp/django-cms/teams","hooks_url":"https://api.github.com/repos/evildmp/django-cms/hooks","issue_events_url":"https://api.github.com/repos/evildmp/django-cms/issues/events{/number}","events_url":"https://api.github.com/repos/evildmp/django-cms/events","assignees_url":"https://api.github.com/repos/evildmp/django-cms/assignees{/user}","branches_url":"https://api.github.com/repos/evildmp/django-cms/branches{/branch}","tags_url":"https://api.github.com/repos/evildmp/django-cms/tags","blobs_url":"https://api.github.com/repos/evildmp/django-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evildmp/django-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evildmp/django-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/evildmp/django-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evildmp/django-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/evildmp/django-cms/languages","stargazers_url":"https://api.github.com/repos/evildmp/django-cms/stargazers","contributors_url":"https://api.github.com/repos/evildmp/django-cms/contributors","subscribers_url":"https://api.github.com/repos/evildmp/django-cms/subscribers","subscription_url":"https://api.github.com/repos/evildmp/django-cms/subscription","commits_url":"https://api.github.com/repos/evildmp/django-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/evildmp/django-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/evildmp/django-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/evildmp/django-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/evildmp/django-cms/contents/{+path}","compare_url":"https://api.github.com/repos/evildmp/django-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evildmp/django-cms/merges","archive_url":"https://api.github.com/repos/evildmp/django-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evildmp/django-cms/downloads","issues_url":"https://api.github.com/repos/evildmp/django-cms/issues{/number}","pulls_url":"https://api.github.com/repos/evildmp/django-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/evildmp/django-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/evildmp/django-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evildmp/django-cms/labels{/name}","releases_url":"https://api.github.com/repos/evildmp/django-cms/releases{/id}","deployments_url":"https://api.github.com/repos/evildmp/django-cms/deployments","created_at":"2011-06-09T09:38:44Z","updated_at":"2014-09-06T21:50:51Z","pushed_at":"2016-07-25T14:28:16Z","git_url":"git://github.com/evildmp/django-cms.git","ssh_url":"git@github.com:evildmp/django-cms.git","clone_url":"https://github.com/evildmp/django-cms.git","svn_url":"https://github.com/evildmp/django-cms","homepage":"http://www.django-cms.org","size":66530,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"master"}},"base":{"label":"divio:release/3.3.x","ref":"release/3.3.x","sha":"1ac3e9212e275b6a350649af1d3c8ec6845dea98","user":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"repo":{"id":143580,"name":"django-cms","full_name":"divio/django-cms","owner":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/divio/django-cms","description":"The easy-to-use and developer-friendly CMS","fork":false,"url":"https://api.github.com/repos/divio/django-cms","forks_url":"https://api.github.com/repos/divio/django-cms/forks","keys_url":"https://api.github.com/repos/divio/django-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divio/django-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divio/django-cms/teams","hooks_url":"https://api.github.com/repos/divio/django-cms/hooks","issue_events_url":"https://api.github.com/repos/divio/django-cms/issues/events{/number}","events_url":"https://api.github.com/repos/divio/django-cms/events","assignees_url":"https://api.github.com/repos/divio/django-cms/assignees{/user}","branches_url":"https://api.github.com/repos/divio/django-cms/branches{/branch}","tags_url":"https://api.github.com/repos/divio/django-cms/tags","blobs_url":"https://api.github.com/repos/divio/django-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divio/django-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divio/django-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/divio/django-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divio/django-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/divio/django-cms/languages","stargazers_url":"https://api.github.com/repos/divio/django-cms/stargazers","contributors_url":"https://api.github.com/repos/divio/django-cms/contributors","subscribers_url":"https://api.github.com/repos/divio/django-cms/subscribers","subscription_url":"https://api.github.com/repos/divio/django-cms/subscription","commits_url":"https://api.github.com/repos/divio/django-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/divio/django-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/divio/django-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/divio/django-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/divio/django-cms/contents/{+path}","compare_url":"https://api.github.com/repos/divio/django-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divio/django-cms/merges","archive_url":"https://api.github.com/repos/divio/django-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divio/django-cms/downloads","issues_url":"https://api.github.com/repos/divio/django-cms/issues{/number}","pulls_url":"https://api.github.com/repos/divio/django-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/divio/django-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/divio/django-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divio/django-cms/labels{/name}","releases_url":"https://api.github.com/repos/divio/django-cms/releases{/id}","deployments_url":"https://api.github.com/repos/divio/django-cms/deployments","created_at":"2009-03-05T10:14:18Z","updated_at":"2016-07-25T22:29:49Z","pushed_at":"2016-07-26T11:41:29Z","git_url":"git://github.com/divio/django-cms.git","ssh_url":"git@github.com:divio/django-cms.git","clone_url":"https://github.com/divio/django-cms.git","svn_url":"https://github.com/divio/django-cms","homepage":"http://www.django-cms.org","size":120329,"stargazers_count":4293,"watchers_count":4293,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1643,"mirror_url":null,"open_issues_count":211,"forks":1643,"open_issues":211,"watchers":4293,"default_branch":"release/3.3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/divio/django-cms/pulls/5544"},"html":{"href":"https://github.com/divio/django-cms/pull/5544"},"issue":{"href":"https://api.github.com/repos/divio/django-cms/issues/5544"},"comments":{"href":"https://api.github.com/repos/divio/django-cms/issues/5544/comments"},"review_comments":{"href":"https://api.github.com/repos/divio/django-cms/pulls/5544/comments"},"review_comment":{"href":"https://api.github.com/repos/divio/django-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/divio/django-cms/pulls/5544/commits"},"statuses":{"href":"https://api.github.com/repos/divio/django-cms/statuses/53ff1b19215bee7767584b92fb495a78431b46bc"}}}}
{"actor":{"display_login":"czpython"}}