{"action":"created","comment":{"url":"https://api.github.com/repos/fidals/refarm-site/pulls/comments/72409411","id":72409411,"diff_hunk":"@@ -58,82 +88,165 @@ def date_published(self, value):\n \n     @property\n     def menu_title(self):\n-        return self._menu_title or self.name\n+        return self._menu_title or self.title\n \n     @menu_title.setter\n     def menu_title(self, value):\n-        self._h1 = value\n+        self._menu_title = value\n \n-    class Meta:\n-        abstract = True\n+    @property\n+    def model(self):\n+        if self.type not in [self.DEFAULT_TYPE, self.STRUCT_TYPE]:\n+            return getattr(self, self.type)\n+        else:\n+            return None\n \n+    def __str__(self):\n+        \"\"\":return: name field value\"\"\"\n+        return self.title\n \n-def get_crumbs(last_item):\n-    \"\"\"\n-    Returns specified item ancestors as breadcrumbs\n-    :param last_item: last crumb's item entity\n-    :return: crumbs named tuple:\n-     (('First page', 'one/'), ('Second page', 'two/'),)\n-    \"\"\"\n-    if isinstance(last_item, Post):\n-        return (\n-            Crumb(settings.CRUMBS['main'], '/'),\n-            Crumb(last_item.get_type_name(),\n-                  reverse('pages:posts', args=(last_item.type,))),\n-            Crumb(last_item.name, ''),\n-        )\n-    elif last_item == settings.CRUMBS['pages']:\n+    def get_path(self, include_self=True):\n+        \"\"\"Get page parents list\"\"\"\n+        def create_path(page):\n+            while page:\n+                if page != self or include_self:\n+                    yield page","path":"pages/models.py","position":148,"original_position":148,"commit_id":"bc81a03112fcbc965df5b5bc2519d3c5fb18d084","original_commit_id":"bc81a03112fcbc965df5b5bc2519d3c5fb18d084","user":{"login":"duker33","id":3526796,"avatar_url":"https://avatars.githubusercontent.com/u/3526796?v=3","gravatar_id":"","url":"https://api.github.com/users/duker33","html_url":"https://github.com/duker33","followers_url":"https://api.github.com/users/duker33/followers","following_url":"https://api.github.com/users/duker33/following{/other_user}","gists_url":"https://api.github.com/users/duker33/gists{/gist_id}","starred_url":"https://api.github.com/users/duker33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duker33/subscriptions","organizations_url":"https://api.github.com/users/duker33/orgs","repos_url":"https://api.github.com/users/duker33/repos","events_url":"https://api.github.com/users/duker33/events{/privacy}","received_events_url":"https://api.github.com/users/duker33/received_events","type":"User","site_admin":false},"body":"производительности он не добавляет, но сам код выглядит приличнее. Не надо инициализировать список, добавлять ему значения","created_at":"2016-07-27T09:37:06Z","updated_at":"2016-07-27T09:37:06Z","html_url":"https://github.com/fidals/refarm-site/pull/15#discussion_r72409411","pull_request_url":"https://api.github.com/repos/fidals/refarm-site/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/comments/72409411"},"html":{"href":"https://github.com/fidals/refarm-site/pull/15#discussion_r72409411"},"pull_request":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/fidals/refarm-site/pulls/15","id":78876874,"html_url":"https://github.com/fidals/refarm-site/pull/15","diff_url":"https://github.com/fidals/refarm-site/pull/15.diff","patch_url":"https://github.com/fidals/refarm-site/pull/15.patch","issue_url":"https://api.github.com/repos/fidals/refarm-site/issues/15","number":15,"state":"open","locked":false,"title":"[ 763 ] RF SE Site app","user":{"login":"duker33","id":3526796,"avatar_url":"https://avatars.githubusercontent.com/u/3526796?v=3","gravatar_id":"","url":"https://api.github.com/users/duker33","html_url":"https://github.com/duker33","followers_url":"https://api.github.com/users/duker33/followers","following_url":"https://api.github.com/users/duker33/following{/other_user}","gists_url":"https://api.github.com/users/duker33/gists{/gist_id}","starred_url":"https://api.github.com/users/duker33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duker33/subscriptions","organizations_url":"https://api.github.com/users/duker33/orgs","repos_url":"https://api.github.com/users/duker33/repos","events_url":"https://api.github.com/users/duker33/events{/privacy}","received_events_url":"https://api.github.com/users/duker33/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-26T15:50:28Z","updated_at":"2016-07-27T09:37:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63d14bab70164f9ae381f8f9c45427e29983ad50","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fidals/refarm-site/pulls/15/commits","review_comments_url":"https://api.github.com/repos/fidals/refarm-site/pulls/15/comments","review_comment_url":"https://api.github.com/repos/fidals/refarm-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fidals/refarm-site/issues/15/comments","statuses_url":"https://api.github.com/repos/fidals/refarm-site/statuses/bc81a03112fcbc965df5b5bc2519d3c5fb18d084","head":{"label":"fidals:f-763_site_app","ref":"f-763_site_app","sha":"bc81a03112fcbc965df5b5bc2519d3c5fb18d084","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":55603017,"name":"refarm-site","full_name":"fidals/refarm-site","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/refarm-site","description":"Django application with simple blog functions","fork":false,"url":"https://api.github.com/repos/fidals/refarm-site","forks_url":"https://api.github.com/repos/fidals/refarm-site/forks","keys_url":"https://api.github.com/repos/fidals/refarm-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/refarm-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/refarm-site/teams","hooks_url":"https://api.github.com/repos/fidals/refarm-site/hooks","issue_events_url":"https://api.github.com/repos/fidals/refarm-site/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/refarm-site/events","assignees_url":"https://api.github.com/repos/fidals/refarm-site/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/refarm-site/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/refarm-site/tags","blobs_url":"https://api.github.com/repos/fidals/refarm-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/refarm-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/refarm-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/refarm-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/refarm-site/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/refarm-site/languages","stargazers_url":"https://api.github.com/repos/fidals/refarm-site/stargazers","contributors_url":"https://api.github.com/repos/fidals/refarm-site/contributors","subscribers_url":"https://api.github.com/repos/fidals/refarm-site/subscribers","subscription_url":"https://api.github.com/repos/fidals/refarm-site/subscription","commits_url":"https://api.github.com/repos/fidals/refarm-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/refarm-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/refarm-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/refarm-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/refarm-site/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/refarm-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/refarm-site/merges","archive_url":"https://api.github.com/repos/fidals/refarm-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/refarm-site/downloads","issues_url":"https://api.github.com/repos/fidals/refarm-site/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/refarm-site/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/refarm-site/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/refarm-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/refarm-site/labels{/name}","releases_url":"https://api.github.com/repos/fidals/refarm-site/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/refarm-site/deployments","created_at":"2016-04-06T12:14:48Z","updated_at":"2016-07-07T09:13:32Z","pushed_at":"2016-07-26T15:50:28Z","git_url":"git://github.com/fidals/refarm-site.git","ssh_url":"git@github.com:fidals/refarm-site.git","clone_url":"https://github.com/fidals/refarm-site.git","svn_url":"https://github.com/fidals/refarm-site","homepage":"","size":40,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"fidals:master","ref":"master","sha":"f89201d35f394141e2da215f4521e138c9647888","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":55603017,"name":"refarm-site","full_name":"fidals/refarm-site","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/refarm-site","description":"Django application with simple blog functions","fork":false,"url":"https://api.github.com/repos/fidals/refarm-site","forks_url":"https://api.github.com/repos/fidals/refarm-site/forks","keys_url":"https://api.github.com/repos/fidals/refarm-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/refarm-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/refarm-site/teams","hooks_url":"https://api.github.com/repos/fidals/refarm-site/hooks","issue_events_url":"https://api.github.com/repos/fidals/refarm-site/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/refarm-site/events","assignees_url":"https://api.github.com/repos/fidals/refarm-site/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/refarm-site/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/refarm-site/tags","blobs_url":"https://api.github.com/repos/fidals/refarm-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/refarm-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/refarm-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/refarm-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/refarm-site/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/refarm-site/languages","stargazers_url":"https://api.github.com/repos/fidals/refarm-site/stargazers","contributors_url":"https://api.github.com/repos/fidals/refarm-site/contributors","subscribers_url":"https://api.github.com/repos/fidals/refarm-site/subscribers","subscription_url":"https://api.github.com/repos/fidals/refarm-site/subscription","commits_url":"https://api.github.com/repos/fidals/refarm-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/refarm-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/refarm-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/refarm-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/refarm-site/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/refarm-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/refarm-site/merges","archive_url":"https://api.github.com/repos/fidals/refarm-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/refarm-site/downloads","issues_url":"https://api.github.com/repos/fidals/refarm-site/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/refarm-site/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/refarm-site/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/refarm-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/refarm-site/labels{/name}","releases_url":"https://api.github.com/repos/fidals/refarm-site/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/refarm-site/deployments","created_at":"2016-04-06T12:14:48Z","updated_at":"2016-07-07T09:13:32Z","pushed_at":"2016-07-26T15:50:28Z","git_url":"git://github.com/fidals/refarm-site.git","ssh_url":"git@github.com:fidals/refarm-site.git","clone_url":"https://github.com/fidals/refarm-site.git","svn_url":"https://github.com/fidals/refarm-site","homepage":"","size":40,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/15"},"html":{"href":"https://github.com/fidals/refarm-site/pull/15"},"issue":{"href":"https://api.github.com/repos/fidals/refarm-site/issues/15"},"comments":{"href":"https://api.github.com/repos/fidals/refarm-site/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fidals/refarm-site/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/fidals/refarm-site/statuses/bc81a03112fcbc965df5b5bc2519d3c5fb18d084"}}}}
{"actor":{"display_login":"duker33"}}