{"action":"created","comment":{"url":"https://api.github.com/repos/fidals/shopelectro/pulls/comments/78014188","id":78014188,"diff_hunk":"@@ -279,26 +279,23 @@ def admin_tree_items(request):\n     def __create_json_response(entities):\n         \"\"\"Create data for jsTree and return Json response\"\"\"\n         def __setup_view_name(entity):\n-            \"\"\"Get view's name for certain entity (ex.'admin:shopelectro_category_change')\"\"\"\n-            app_name = entity._meta.app_label\n-            model_name = entity._meta.model_name\n-\n-            return ('admin:{app_name}_{model_name}_change'\n-                    .format(app_name=app_name, model_name=model_name))\n+            \"\"\"Get view's name for certain entity (ex.'custom_admin:pages_page_change')\"\"\"\n+            return ('custom_admin:{db_table}_change'\n+                    .format(db_table=entity._meta.db_table))\n \n-        view_name = __setup_view_name(entities[0])\n+        view_name = __setup_view_name(entities[0].page)\n         has_children = isinstance(entities[0], Category)\n \n         # jsTree has restriction on the name fields\n         data_for_jstree = [{\n-            'id': entity.id,\n-            'text': '[ {id} ] {name}'.format(id=entity.id, name=entity.name),\n-            'children': has_children,  # if False, then lazy load switch off\n-            'a_attr': {  # it is 'a' tag attribute\n-                'href-site-page': entity.get_absolute_url(),\n-                'href-admin-page': reverse(view_name, args=(entity.id,)),\n-                'search-term': entity.name,\n-            }\n+           'id': entity.id,\n+           'text': '[ {id} ] {name}'.format(id=entity.id, name=entity.name),\n+           'children': has_children, # if False, then lazy load switch off\n+           'a_attr': { # it is \"a\" tag's attribute","path":"shopelectro/views.py","position":81,"original_position":81,"commit_id":"41d9f41a2c4eee0c4a2cae51ce2b51970057414b","original_commit_id":"41d9f41a2c4eee0c4a2cae51ce2b51970057414b","user":{"login":"YozhEzhi","id":2706062,"avatar_url":"https://avatars.githubusercontent.com/u/2706062?v=3","gravatar_id":"","url":"https://api.github.com/users/YozhEzhi","html_url":"https://github.com/YozhEzhi","followers_url":"https://api.github.com/users/YozhEzhi/followers","following_url":"https://api.github.com/users/YozhEzhi/following{/other_user}","gists_url":"https://api.github.com/users/YozhEzhi/gists{/gist_id}","starred_url":"https://api.github.com/users/YozhEzhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YozhEzhi/subscriptions","organizations_url":"https://api.github.com/users/YozhEzhi/orgs","repos_url":"https://api.github.com/users/YozhEzhi/repos","events_url":"https://api.github.com/users/YozhEzhi/events{/privacy}","received_events_url":"https://api.github.com/users/YozhEzhi/received_events","type":"User","site_admin":false},"body":"А почему заменил на двойные кавычки? pylint ругается?","created_at":"2016-09-08T14:15:23Z","updated_at":"2016-09-08T14:15:23Z","html_url":"https://github.com/fidals/shopelectro/pull/64#discussion_r78014188","pull_request_url":"https://api.github.com/repos/fidals/shopelectro/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/comments/78014188"},"html":{"href":"https://github.com/fidals/shopelectro/pull/64#discussion_r78014188"},"pull_request":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/fidals/shopelectro/pulls/64","id":84466372,"html_url":"https://github.com/fidals/shopelectro/pull/64","diff_url":"https://github.com/fidals/shopelectro/pull/64.diff","patch_url":"https://github.com/fidals/shopelectro/pull/64.patch","issue_url":"https://api.github.com/repos/fidals/shopelectro/issues/64","number":64,"state":"open","locked":false,"title":"[ f-774 ] RF admin backend","user":{"login":"wrtds2","id":13870342,"avatar_url":"https://avatars.githubusercontent.com/u/13870342?v=3","gravatar_id":"","url":"https://api.github.com/users/wrtds2","html_url":"https://github.com/wrtds2","followers_url":"https://api.github.com/users/wrtds2/followers","following_url":"https://api.github.com/users/wrtds2/following{/other_user}","gists_url":"https://api.github.com/users/wrtds2/gists{/gist_id}","starred_url":"https://api.github.com/users/wrtds2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrtds2/subscriptions","organizations_url":"https://api.github.com/users/wrtds2/orgs","repos_url":"https://api.github.com/users/wrtds2/repos","events_url":"https://api.github.com/users/wrtds2/events{/privacy}","received_events_url":"https://api.github.com/users/wrtds2/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-08T12:17:39Z","updated_at":"2016-09-08T14:15:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1fddeacdd08cf0e6e26b1739631d59522507643","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fidals/shopelectro/pulls/64/commits","review_comments_url":"https://api.github.com/repos/fidals/shopelectro/pulls/64/comments","review_comment_url":"https://api.github.com/repos/fidals/shopelectro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fidals/shopelectro/issues/64/comments","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/41d9f41a2c4eee0c4a2cae51ce2b51970057414b","head":{"label":"fidals:f-774_RF_Admin_backend","ref":"f-774_RF_Admin_backend","sha":"41d9f41a2c4eee0c4a2cae51ce2b51970057414b","user":{"login":"fidals","id":16228604,"avatar_url":"https://avatars.githubusercontent.com/u/16228604?v=3","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"repo":{"id":57301144,"name":"shopelectro","full_name":"fidals/shopelectro","owner":{"login":"fidals","id":16228604,"avatar_url":"https://avatars.githubusercontent.com/u/16228604?v=3","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fidals/shopelectro","description":"shopelectro.ru site's code","fork":false,"url":"https://api.github.com/repos/fidals/shopelectro","forks_url":"https://api.github.com/repos/fidals/shopelectro/forks","keys_url":"https://api.github.com/repos/fidals/shopelectro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/shopelectro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/shopelectro/teams","hooks_url":"https://api.github.com/repos/fidals/shopelectro/hooks","issue_events_url":"https://api.github.com/repos/fidals/shopelectro/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/shopelectro/events","assignees_url":"https://api.github.com/repos/fidals/shopelectro/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/shopelectro/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/shopelectro/tags","blobs_url":"https://api.github.com/repos/fidals/shopelectro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/shopelectro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/shopelectro/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/shopelectro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/shopelectro/languages","stargazers_url":"https://api.github.com/repos/fidals/shopelectro/stargazers","contributors_url":"https://api.github.com/repos/fidals/shopelectro/contributors","subscribers_url":"https://api.github.com/repos/fidals/shopelectro/subscribers","subscription_url":"https://api.github.com/repos/fidals/shopelectro/subscription","commits_url":"https://api.github.com/repos/fidals/shopelectro/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/shopelectro/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/shopelectro/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/shopelectro/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/shopelectro/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/shopelectro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/shopelectro/merges","archive_url":"https://api.github.com/repos/fidals/shopelectro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/shopelectro/downloads","issues_url":"https://api.github.com/repos/fidals/shopelectro/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/shopelectro/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/shopelectro/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/shopelectro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/shopelectro/labels{/name}","releases_url":"https://api.github.com/repos/fidals/shopelectro/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/shopelectro/deployments","created_at":"2016-04-28T12:43:43Z","updated_at":"2016-07-11T12:16:15Z","pushed_at":"2016-09-08T12:58:14Z","git_url":"git://github.com/fidals/shopelectro.git","ssh_url":"git@github.com:fidals/shopelectro.git","clone_url":"https://github.com/fidals/shopelectro.git","svn_url":"https://github.com/fidals/shopelectro","homepage":null,"size":4490,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"fidals:master","ref":"master","sha":"15610e2364e40c862f0274f5d4d634115fa82841","user":{"login":"fidals","id":16228604,"avatar_url":"https://avatars.githubusercontent.com/u/16228604?v=3","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"repo":{"id":57301144,"name":"shopelectro","full_name":"fidals/shopelectro","owner":{"login":"fidals","id":16228604,"avatar_url":"https://avatars.githubusercontent.com/u/16228604?v=3","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fidals/shopelectro","description":"shopelectro.ru site's code","fork":false,"url":"https://api.github.com/repos/fidals/shopelectro","forks_url":"https://api.github.com/repos/fidals/shopelectro/forks","keys_url":"https://api.github.com/repos/fidals/shopelectro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/shopelectro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/shopelectro/teams","hooks_url":"https://api.github.com/repos/fidals/shopelectro/hooks","issue_events_url":"https://api.github.com/repos/fidals/shopelectro/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/shopelectro/events","assignees_url":"https://api.github.com/repos/fidals/shopelectro/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/shopelectro/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/shopelectro/tags","blobs_url":"https://api.github.com/repos/fidals/shopelectro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/shopelectro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/shopelectro/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/shopelectro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/shopelectro/languages","stargazers_url":"https://api.github.com/repos/fidals/shopelectro/stargazers","contributors_url":"https://api.github.com/repos/fidals/shopelectro/contributors","subscribers_url":"https://api.github.com/repos/fidals/shopelectro/subscribers","subscription_url":"https://api.github.com/repos/fidals/shopelectro/subscription","commits_url":"https://api.github.com/repos/fidals/shopelectro/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/shopelectro/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/shopelectro/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/shopelectro/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/shopelectro/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/shopelectro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/shopelectro/merges","archive_url":"https://api.github.com/repos/fidals/shopelectro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/shopelectro/downloads","issues_url":"https://api.github.com/repos/fidals/shopelectro/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/shopelectro/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/shopelectro/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/shopelectro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/shopelectro/labels{/name}","releases_url":"https://api.github.com/repos/fidals/shopelectro/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/shopelectro/deployments","created_at":"2016-04-28T12:43:43Z","updated_at":"2016-07-11T12:16:15Z","pushed_at":"2016-09-08T12:58:14Z","git_url":"git://github.com/fidals/shopelectro.git","ssh_url":"git@github.com:fidals/shopelectro.git","clone_url":"https://github.com/fidals/shopelectro.git","svn_url":"https://github.com/fidals/shopelectro","homepage":null,"size":4490,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/64"},"html":{"href":"https://github.com/fidals/shopelectro/pull/64"},"issue":{"href":"https://api.github.com/repos/fidals/shopelectro/issues/64"},"comments":{"href":"https://api.github.com/repos/fidals/shopelectro/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/fidals/shopelectro/statuses/41d9f41a2c4eee0c4a2cae51ce2b51970057414b"}}}}
{"actor":{"display_login":"YozhEzhi"}}