{"action":"closed","number":1478,"pull_request":{"url":"https://api.github.com/repos/torchbox/wagtail/pulls/1478","id":39281805,"html_url":"https://github.com/torchbox/wagtail/pull/1478","diff_url":"https://github.com/torchbox/wagtail/pull/1478.diff","patch_url":"https://github.com/torchbox/wagtail/pull/1478.patch","issue_url":"https://api.github.com/repos/torchbox/wagtail/issues/1478","number":1478,"state":"closed","locked":false,"title":"Use QuerySet based search API (and deprecate old search APIs)","user":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"body":"Also, fixes #1 \r\n\r\nPreviously, the Page, Image and Document models all had a search method. This pull request deprecates these and replaces them with a QuerySet method instead.\r\n\r\nThe main advantage of the QuerySet API is filtering is much easier.\r\n\r\nBefore:\r\n```\r\nimages = Image.search(query_string, filters={'uploaded_by_user_id': request.user.id})\r\n```\r\nAfter:\r\n```\r\nImages = Images.objects.filter(uploaded_by_user=request.user).search(query_string)\r\n```\r\n\r\nAny Image, Document or Page QuerySet can be searched like this which should improve code reuse","created_at":"2015-07-06T15:48:34Z","updated_at":"2015-10-07T19:02:53Z","closed_at":"2015-10-07T19:02:53Z","merged_at":"2015-10-07T19:02:53Z","merge_commit_sha":"7162e7a9d6f78428d507c0e5c432ddb054539412","assignee":null,"milestone":{"url":"https://api.github.com/repos/torchbox/wagtail/milestones/18","html_url":"https://github.com/torchbox/wagtail/milestones/1.2","labels_url":"https://api.github.com/repos/torchbox/wagtail/milestones/18/labels","id":1277884,"number":18,"title":"1.2","description":"","creator":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"open_issues":86,"closed_issues":23,"state":"open","created_at":"2015-08-28T16:20:42Z","updated_at":"2015-10-07T19:02:53Z","due_on":"2015-09-29T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/torchbox/wagtail/pulls/1478/commits","review_comments_url":"https://api.github.com/repos/torchbox/wagtail/pulls/1478/comments","review_comment_url":"https://api.github.com/repos/torchbox/wagtail/pulls/comments{/number}","comments_url":"https://api.github.com/repos/torchbox/wagtail/issues/1478/comments","statuses_url":"https://api.github.com/repos/torchbox/wagtail/statuses/23279ad4c6201a938f70824a2808c109f08161c2","head":{"label":"kaedroho:use-queryset-based-search-api","ref":"use-queryset-based-search-api","sha":"23279ad4c6201a938f70824a2808c109f08161c2","user":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"repo":{"id":16483819,"name":"wagtail","full_name":"kaedroho/wagtail","owner":{"login":"kaedroho","id":1093808,"avatar_url":"https://avatars.githubusercontent.com/u/1093808?v=3","gravatar_id":"","url":"https://api.github.com/users/kaedroho","html_url":"https://github.com/kaedroho","followers_url":"https://api.github.com/users/kaedroho/followers","following_url":"https://api.github.com/users/kaedroho/following{/other_user}","gists_url":"https://api.github.com/users/kaedroho/gists{/gist_id}","starred_url":"https://api.github.com/users/kaedroho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaedroho/subscriptions","organizations_url":"https://api.github.com/users/kaedroho/orgs","repos_url":"https://api.github.com/users/kaedroho/repos","events_url":"https://api.github.com/users/kaedroho/events{/privacy}","received_events_url":"https://api.github.com/users/kaedroho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaedroho/wagtail","description":"Django-based content management system","fork":true,"url":"https://api.github.com/repos/kaedroho/wagtail","forks_url":"https://api.github.com/repos/kaedroho/wagtail/forks","keys_url":"https://api.github.com/repos/kaedroho/wagtail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaedroho/wagtail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaedroho/wagtail/teams","hooks_url":"https://api.github.com/repos/kaedroho/wagtail/hooks","issue_events_url":"https://api.github.com/repos/kaedroho/wagtail/issues/events{/number}","events_url":"https://api.github.com/repos/kaedroho/wagtail/events","assignees_url":"https://api.github.com/repos/kaedroho/wagtail/assignees{/user}","branches_url":"https://api.github.com/repos/kaedroho/wagtail/branches{/branch}","tags_url":"https://api.github.com/repos/kaedroho/wagtail/tags","blobs_url":"https://api.github.com/repos/kaedroho/wagtail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaedroho/wagtail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaedroho/wagtail/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaedroho/wagtail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaedroho/wagtail/statuses/{sha}","languages_url":"https://api.github.com/repos/kaedroho/wagtail/languages","stargazers_url":"https://api.github.com/repos/kaedroho/wagtail/stargazers","contributors_url":"https://api.github.com/repos/kaedroho/wagtail/contributors","subscribers_url":"https://api.github.com/repos/kaedroho/wagtail/subscribers","subscription_url":"https://api.github.com/repos/kaedroho/wagtail/subscription","commits_url":"https://api.github.com/repos/kaedroho/wagtail/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaedroho/wagtail/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaedroho/wagtail/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaedroho/wagtail/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaedroho/wagtail/contents/{+path}","compare_url":"https://api.github.com/repos/kaedroho/wagtail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaedroho/wagtail/merges","archive_url":"https://api.github.com/repos/kaedroho/wagtail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaedroho/wagtail/downloads","issues_url":"https://api.github.com/repos/kaedroho/wagtail/issues{/number}","pulls_url":"https://api.github.com/repos/kaedroho/wagtail/pulls{/number}","milestones_url":"https://api.github.com/repos/kaedroho/wagtail/milestones{/number}","notifications_url":"https://api.github.com/repos/kaedroho/wagtail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaedroho/wagtail/labels{/name}","releases_url":"https://api.github.com/repos/kaedroho/wagtail/releases{/id}","created_at":"2014-02-03T15:46:45Z","updated_at":"2015-05-07T09:34:19Z","pushed_at":"2015-10-06T18:09:51Z","git_url":"git://github.com/kaedroho/wagtail.git","ssh_url":"git@github.com:kaedroho/wagtail.git","clone_url":"https://github.com/kaedroho/wagtail.git","svn_url":"https://github.com/kaedroho/wagtail","homepage":null,"size":25627,"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":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"torchbox:master","ref":"master","sha":"11a14389508a76ec1beb3df787e5ef652cb3109b","user":{"login":"torchbox","id":84015,"avatar_url":"https://avatars.githubusercontent.com/u/84015?v=3","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"repo":{"id":16479108,"name":"wagtail","full_name":"torchbox/wagtail","owner":{"login":"torchbox","id":84015,"avatar_url":"https://avatars.githubusercontent.com/u/84015?v=3","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/torchbox/wagtail","description":"A Django content management system focused on flexibility and user experience","fork":false,"url":"https://api.github.com/repos/torchbox/wagtail","forks_url":"https://api.github.com/repos/torchbox/wagtail/forks","keys_url":"https://api.github.com/repos/torchbox/wagtail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torchbox/wagtail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torchbox/wagtail/teams","hooks_url":"https://api.github.com/repos/torchbox/wagtail/hooks","issue_events_url":"https://api.github.com/repos/torchbox/wagtail/issues/events{/number}","events_url":"https://api.github.com/repos/torchbox/wagtail/events","assignees_url":"https://api.github.com/repos/torchbox/wagtail/assignees{/user}","branches_url":"https://api.github.com/repos/torchbox/wagtail/branches{/branch}","tags_url":"https://api.github.com/repos/torchbox/wagtail/tags","blobs_url":"https://api.github.com/repos/torchbox/wagtail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torchbox/wagtail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torchbox/wagtail/git/refs{/sha}","trees_url":"https://api.github.com/repos/torchbox/wagtail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torchbox/wagtail/statuses/{sha}","languages_url":"https://api.github.com/repos/torchbox/wagtail/languages","stargazers_url":"https://api.github.com/repos/torchbox/wagtail/stargazers","contributors_url":"https://api.github.com/repos/torchbox/wagtail/contributors","subscribers_url":"https://api.github.com/repos/torchbox/wagtail/subscribers","subscription_url":"https://api.github.com/repos/torchbox/wagtail/subscription","commits_url":"https://api.github.com/repos/torchbox/wagtail/commits{/sha}","git_commits_url":"https://api.github.com/repos/torchbox/wagtail/git/commits{/sha}","comments_url":"https://api.github.com/repos/torchbox/wagtail/comments{/number}","issue_comment_url":"https://api.github.com/repos/torchbox/wagtail/issues/comments{/number}","contents_url":"https://api.github.com/repos/torchbox/wagtail/contents/{+path}","compare_url":"https://api.github.com/repos/torchbox/wagtail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torchbox/wagtail/merges","archive_url":"https://api.github.com/repos/torchbox/wagtail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torchbox/wagtail/downloads","issues_url":"https://api.github.com/repos/torchbox/wagtail/issues{/number}","pulls_url":"https://api.github.com/repos/torchbox/wagtail/pulls{/number}","milestones_url":"https://api.github.com/repos/torchbox/wagtail/milestones{/number}","notifications_url":"https://api.github.com/repos/torchbox/wagtail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torchbox/wagtail/labels{/name}","releases_url":"https://api.github.com/repos/torchbox/wagtail/releases{/id}","created_at":"2014-02-03T12:41:59Z","updated_at":"2015-10-07T16:59:29Z","pushed_at":"2015-10-07T19:02:51Z","git_url":"git://github.com/torchbox/wagtail.git","ssh_url":"git@github.com:torchbox/wagtail.git","clone_url":"https://github.com/torchbox/wagtail.git","svn_url":"https://github.com/torchbox/wagtail","homepage":"wagtail.io","size":39526,"stargazers_count":2976,"watchers_count":2976,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":458,"mirror_url":null,"open_issues_count":341,"forks":458,"open_issues":341,"watchers":2976,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/1478"},"html":{"href":"https://github.com/torchbox/wagtail/pull/1478"},"issue":{"href":"https://api.github.com/repos/torchbox/wagtail/issues/1478"},"comments":{"href":"https://api.github.com/repos/torchbox/wagtail/issues/1478/comments"},"review_comments":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/1478/comments"},"review_comment":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/1478/commits"},"statuses":{"href":"https://api.github.com/repos/torchbox/wagtail/statuses/23279ad4c6201a938f70824a2808c109f08161c2"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":11,"additions":96,"deletions":56,"changed_files":12}}