{"action":"created","comment":{"url":"https://api.github.com/repos/divio/django-cms/pulls/comments/211431245","pull_request_review_id":147845359,"id":211431245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTQzMTI0NQ==","diff_hunk":"@@ -188,3 +183,59 @@ def login(request):\n     else:\n         redirect_to += u'?cms_toolbar_login_error=1'\n     return HttpResponseRedirect(redirect_to)\n+\n+\n+def render_object_structure(request, content_type_id, object_id):\n+    content_type = ContentType.objects.get_for_id(content_type_id)\n+\n+    try:\n+        content_type_obj = content_type.get_object_for_this_type(pk=object_id)\n+    except ObjectDoesNotExist:\n+        raise Http404\n+\n+    context = {\n+        'object': content_type_obj,\n+        'cms_toolbar': request.toolbar,\n+    }\n+\n+    if hasattr(request, 'toolbar'):\n+        request.toolbar.set_object(content_type_obj)\n+    return render(request, 'cms/toolbar/structure.html', context)\n+\n+\n+def render_object_edit(request, content_type_id, object_id):\n+    content_type = ContentType.objects.get_for_id(content_type_id)\n+\n+    if not is_model_editable(content_type.model_class()):\n+        raise Http404\n+\n+    try:\n+        content_type_obj = content_type.get_object_for_this_type(pk=object_id)\n+    except ObjectDoesNotExist:\n+        raise Http404\n+\n+    if not hasattr(content_type_obj, 'get_absolute_url'):\n+        raise NotImplementedError('get_absolute_url not implemented for object')","path":"cms/views.py","position":86,"original_position":86,"commit_id":"b4bb323380edbbca129a9cdffecb7443bb7862bf","original_commit_id":"b4bb323380edbbca129a9cdffecb7443bb7862bf","user":{"login":"czpython","id":994951,"node_id":"MDQ6VXNlcjk5NDk1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/994951?v=4","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":"doesn't help end user.\r\nreturn BadRequest()","created_at":"2018-08-20T22:49:08Z","updated_at":"2018-08-20T22:51:37Z","html_url":"https://github.com/divio/django-cms/pull/6482#discussion_r211431245","pull_request_url":"https://api.github.com/repos/divio/django-cms/pulls/6482","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/divio/django-cms/pulls/comments/211431245"},"html":{"href":"https://github.com/divio/django-cms/pull/6482#discussion_r211431245"},"pull_request":{"href":"https://api.github.com/repos/divio/django-cms/pulls/6482"}}},"pull_request":{"url":"https://api.github.com/repos/divio/django-cms/pulls/6482","id":209582871,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NTgyODcx","html_url":"https://github.com/divio/django-cms/pull/6482","diff_url":"https://github.com/divio/django-cms/pull/6482.diff","patch_url":"https://github.com/divio/django-cms/pull/6482.patch","issue_url":"https://api.github.com/repos/divio/django-cms/issues/6482","number":6482,"state":"open","locked":false,"title":"Preview, Structure and Edit endpoints","user":{"login":"Aiky30","id":12543977,"node_id":"MDQ6VXNlcjEyNTQzOTc3","avatar_url":"https://avatars2.githubusercontent.com/u/12543977?v=4","gravatar_id":"","url":"https://api.github.com/users/Aiky30","html_url":"https://github.com/Aiky30","followers_url":"https://api.github.com/users/Aiky30/followers","following_url":"https://api.github.com/users/Aiky30/following{/other_user}","gists_url":"https://api.github.com/users/Aiky30/gists{/gist_id}","starred_url":"https://api.github.com/users/Aiky30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aiky30/subscriptions","organizations_url":"https://api.github.com/users/Aiky30/orgs","repos_url":"https://api.github.com/users/Aiky30/repos","events_url":"https://api.github.com/users/Aiky30/events{/privacy}","received_events_url":"https://api.github.com/users/Aiky30/received_events","type":"User","site_admin":false},"body":"### Summary\r\n\r\nCreate dedicated Preview, Structure and Edit endpoints.\r\n\r\n\r\n\r\n### Documentation checklist\r\n\r\n* [ ] I have updated CHANGELOG.txt if appropriate\r\n* [ ] I have updated the release notes document if appropriate, with:\r\n    * [ ] general notes\r\n    * [ ] bug-fixes\r\n    * [ ] improvements/new features\r\n    * [ ] backwards-incompatible changes\r\n    * [ ] required upgrade steps\r\n    * [ ] names of contributors\r\n* [ ] I have updated other documentation\r\n* [ ] I have added my name to the AUTHORS file\r\n* [ ] This PR's documentation has been approved by Daniele Procida\r\n","created_at":"2018-08-20T16:55:24Z","updated_at":"2018-08-20T22:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07ace2e35951b5c6d51f4465f5973ef52f7d7792","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/divio/django-cms/pulls/6482/commits","review_comments_url":"https://api.github.com/repos/divio/django-cms/pulls/6482/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/6482/comments","statuses_url":"https://api.github.com/repos/divio/django-cms/statuses/b4bb323380edbbca129a9cdffecb7443bb7862bf","head":{"label":"FidelityInternational:feature/object-endpoints","ref":"feature/object-endpoints","sha":"b4bb323380edbbca129a9cdffecb7443bb7862bf","user":{"login":"FidelityInternational","id":17474425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NDc0NDI1","avatar_url":"https://avatars1.githubusercontent.com/u/17474425?v=4","gravatar_id":"","url":"https://api.github.com/users/FidelityInternational","html_url":"https://github.com/FidelityInternational","followers_url":"https://api.github.com/users/FidelityInternational/followers","following_url":"https://api.github.com/users/FidelityInternational/following{/other_user}","gists_url":"https://api.github.com/users/FidelityInternational/gists{/gist_id}","starred_url":"https://api.github.com/users/FidelityInternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FidelityInternational/subscriptions","organizations_url":"https://api.github.com/users/FidelityInternational/orgs","repos_url":"https://api.github.com/users/FidelityInternational/repos","events_url":"https://api.github.com/users/FidelityInternational/events{/privacy}","received_events_url":"https://api.github.com/users/FidelityInternational/received_events","type":"Organization","site_admin":false},"repo":{"id":138866204,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg4NjYyMDQ=","name":"django-cms","full_name":"FidelityInternational/django-cms","owner":{"login":"FidelityInternational","id":17474425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NDc0NDI1","avatar_url":"https://avatars1.githubusercontent.com/u/17474425?v=4","gravatar_id":"","url":"https://api.github.com/users/FidelityInternational","html_url":"https://github.com/FidelityInternational","followers_url":"https://api.github.com/users/FidelityInternational/followers","following_url":"https://api.github.com/users/FidelityInternational/following{/other_user}","gists_url":"https://api.github.com/users/FidelityInternational/gists{/gist_id}","starred_url":"https://api.github.com/users/FidelityInternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FidelityInternational/subscriptions","organizations_url":"https://api.github.com/users/FidelityInternational/orgs","repos_url":"https://api.github.com/users/FidelityInternational/repos","events_url":"https://api.github.com/users/FidelityInternational/events{/privacy}","received_events_url":"https://api.github.com/users/FidelityInternational/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FidelityInternational/django-cms","description":"The easy-to-use and developer-friendly CMS","fork":true,"url":"https://api.github.com/repos/FidelityInternational/django-cms","forks_url":"https://api.github.com/repos/FidelityInternational/django-cms/forks","keys_url":"https://api.github.com/repos/FidelityInternational/django-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FidelityInternational/django-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FidelityInternational/django-cms/teams","hooks_url":"https://api.github.com/repos/FidelityInternational/django-cms/hooks","issue_events_url":"https://api.github.com/repos/FidelityInternational/django-cms/issues/events{/number}","events_url":"https://api.github.com/repos/FidelityInternational/django-cms/events","assignees_url":"https://api.github.com/repos/FidelityInternational/django-cms/assignees{/user}","branches_url":"https://api.github.com/repos/FidelityInternational/django-cms/branches{/branch}","tags_url":"https://api.github.com/repos/FidelityInternational/django-cms/tags","blobs_url":"https://api.github.com/repos/FidelityInternational/django-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FidelityInternational/django-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FidelityInternational/django-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/FidelityInternational/django-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FidelityInternational/django-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/FidelityInternational/django-cms/languages","stargazers_url":"https://api.github.com/repos/FidelityInternational/django-cms/stargazers","contributors_url":"https://api.github.com/repos/FidelityInternational/django-cms/contributors","subscribers_url":"https://api.github.com/repos/FidelityInternational/django-cms/subscribers","subscription_url":"https://api.github.com/repos/FidelityInternational/django-cms/subscription","commits_url":"https://api.github.com/repos/FidelityInternational/django-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/FidelityInternational/django-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/FidelityInternational/django-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/FidelityInternational/django-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/FidelityInternational/django-cms/contents/{+path}","compare_url":"https://api.github.com/repos/FidelityInternational/django-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FidelityInternational/django-cms/merges","archive_url":"https://api.github.com/repos/FidelityInternational/django-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FidelityInternational/django-cms/downloads","issues_url":"https://api.github.com/repos/FidelityInternational/django-cms/issues{/number}","pulls_url":"https://api.github.com/repos/FidelityInternational/django-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/FidelityInternational/django-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/FidelityInternational/django-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FidelityInternational/django-cms/labels{/name}","releases_url":"https://api.github.com/repos/FidelityInternational/django-cms/releases{/id}","deployments_url":"https://api.github.com/repos/FidelityInternational/django-cms/deployments","created_at":"2018-06-27T10:24:20Z","updated_at":"2018-06-27T10:24:26Z","pushed_at":"2018-08-20T16:42:12Z","git_url":"git://github.com/FidelityInternational/django-cms.git","ssh_url":"git@github.com:FidelityInternational/django-cms.git","clone_url":"https://github.com/FidelityInternational/django-cms.git","svn_url":"https://github.com/FidelityInternational/django-cms","homepage":"http://www.django-cms.org","size":79697,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"divio:release/4.0.x","ref":"release/4.0.x","sha":"6fa0d6b49ab34eeb41393782039a73651e6baab3","user":{"login":"divio","id":117904,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzkwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/117904?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM1ODA=","name":"django-cms","full_name":"divio/django-cms","owner":{"login":"divio","id":117904,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzkwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/117904?v=4","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":"2018-08-20T21:02:07Z","pushed_at":"2018-08-20T19:47:30Z","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":79473,"stargazers_count":6101,"watchers_count":6101,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2151,"mirror_url":null,"archived":false,"open_issues_count":230,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2151,"open_issues":230,"watchers":6101,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/divio/django-cms/pulls/6482"},"html":{"href":"https://github.com/divio/django-cms/pull/6482"},"issue":{"href":"https://api.github.com/repos/divio/django-cms/issues/6482"},"comments":{"href":"https://api.github.com/repos/divio/django-cms/issues/6482/comments"},"review_comments":{"href":"https://api.github.com/repos/divio/django-cms/pulls/6482/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/6482/commits"},"statuses":{"href":"https://api.github.com/repos/divio/django-cms/statuses/b4bb323380edbbca129a9cdffecb7443bb7862bf"}},"author_association":"NONE"}}
{"actor":{"display_login":"czpython"}}