{"action":"opened","number":722,"pull_request":{"url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722","id":42333209,"html_url":"https://github.com/django-extensions/django-extensions/pull/722","diff_url":"https://github.com/django-extensions/django-extensions/pull/722.diff","patch_url":"https://github.com/django-extensions/django-extensions/pull/722.patch","issue_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/722","number":722,"state":"open","locked":false,"title":"Added ability to filter autocomplete query","user":{"login":"zefciu","id":135876,"avatar_url":"https://avatars.githubusercontent.com/u/135876?v=3","gravatar_id":"","url":"https://api.github.com/users/zefciu","html_url":"https://github.com/zefciu","followers_url":"https://api.github.com/users/zefciu/followers","following_url":"https://api.github.com/users/zefciu/following{/other_user}","gists_url":"https://api.github.com/users/zefciu/gists{/gist_id}","starred_url":"https://api.github.com/users/zefciu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zefciu/subscriptions","organizations_url":"https://api.github.com/users/zefciu/orgs","repos_url":"https://api.github.com/users/zefciu/repos","events_url":"https://api.github.com/users/zefciu/events{/privacy}","received_events_url":"https://api.github.com/users/zefciu/received_events","type":"User","site_admin":false},"body":"It might be handy for the developer who creates an admin form to add some arbitrary additional filtering for the autocomplete field. An obvious use case would be to limit the list of linkable objects according to some per-row permission rule. This PR contains a simple method that allows to add arbitrary filter depending on the model and request.","created_at":"2015-08-13T10:01:13Z","updated_at":"2015-08-13T10:01:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"296cdd39fb55987240597ff230c9343129d88fdc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722/commits","review_comments_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722/comments","review_comment_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/722/comments","statuses_url":"https://api.github.com/repos/django-extensions/django-extensions/statuses/fa6b0f5ebbafac2983284cd39d77a2e140136afe","head":{"label":"zefciu:related-filter","ref":"related-filter","sha":"fa6b0f5ebbafac2983284cd39d77a2e140136afe","user":{"login":"zefciu","id":135876,"avatar_url":"https://avatars.githubusercontent.com/u/135876?v=3","gravatar_id":"","url":"https://api.github.com/users/zefciu","html_url":"https://github.com/zefciu","followers_url":"https://api.github.com/users/zefciu/followers","following_url":"https://api.github.com/users/zefciu/following{/other_user}","gists_url":"https://api.github.com/users/zefciu/gists{/gist_id}","starred_url":"https://api.github.com/users/zefciu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zefciu/subscriptions","organizations_url":"https://api.github.com/users/zefciu/orgs","repos_url":"https://api.github.com/users/zefciu/repos","events_url":"https://api.github.com/users/zefciu/events{/privacy}","received_events_url":"https://api.github.com/users/zefciu/received_events","type":"User","site_admin":false},"repo":{"id":40602126,"name":"django-extensions","full_name":"zefciu/django-extensions","owner":{"login":"zefciu","id":135876,"avatar_url":"https://avatars.githubusercontent.com/u/135876?v=3","gravatar_id":"","url":"https://api.github.com/users/zefciu","html_url":"https://github.com/zefciu","followers_url":"https://api.github.com/users/zefciu/followers","following_url":"https://api.github.com/users/zefciu/following{/other_user}","gists_url":"https://api.github.com/users/zefciu/gists{/gist_id}","starred_url":"https://api.github.com/users/zefciu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zefciu/subscriptions","organizations_url":"https://api.github.com/users/zefciu/orgs","repos_url":"https://api.github.com/users/zefciu/repos","events_url":"https://api.github.com/users/zefciu/events{/privacy}","received_events_url":"https://api.github.com/users/zefciu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zefciu/django-extensions","description":"This is a repository for collecting global custom management extensions for the Django Framework. ","fork":true,"url":"https://api.github.com/repos/zefciu/django-extensions","forks_url":"https://api.github.com/repos/zefciu/django-extensions/forks","keys_url":"https://api.github.com/repos/zefciu/django-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zefciu/django-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zefciu/django-extensions/teams","hooks_url":"https://api.github.com/repos/zefciu/django-extensions/hooks","issue_events_url":"https://api.github.com/repos/zefciu/django-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/zefciu/django-extensions/events","assignees_url":"https://api.github.com/repos/zefciu/django-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/zefciu/django-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/zefciu/django-extensions/tags","blobs_url":"https://api.github.com/repos/zefciu/django-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zefciu/django-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zefciu/django-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/zefciu/django-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zefciu/django-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/zefciu/django-extensions/languages","stargazers_url":"https://api.github.com/repos/zefciu/django-extensions/stargazers","contributors_url":"https://api.github.com/repos/zefciu/django-extensions/contributors","subscribers_url":"https://api.github.com/repos/zefciu/django-extensions/subscribers","subscription_url":"https://api.github.com/repos/zefciu/django-extensions/subscription","commits_url":"https://api.github.com/repos/zefciu/django-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/zefciu/django-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/zefciu/django-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/zefciu/django-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/zefciu/django-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/zefciu/django-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zefciu/django-extensions/merges","archive_url":"https://api.github.com/repos/zefciu/django-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zefciu/django-extensions/downloads","issues_url":"https://api.github.com/repos/zefciu/django-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/zefciu/django-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/zefciu/django-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/zefciu/django-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zefciu/django-extensions/labels{/name}","releases_url":"https://api.github.com/repos/zefciu/django-extensions/releases{/id}","created_at":"2015-08-12T13:28:27Z","updated_at":"2015-08-12T13:28:28Z","pushed_at":"2015-08-13T09:54:41Z","git_url":"git://github.com/zefciu/django-extensions.git","ssh_url":"git@github.com:zefciu/django-extensions.git","clone_url":"https://github.com/zefciu/django-extensions.git","svn_url":"https://github.com/zefciu/django-extensions","homepage":"http://django-extensions.readthedocs.org","size":5283,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django-extensions:master","ref":"master","sha":"e8953e78552bca8324dd921560012a1d0778c0ff","user":{"login":"django-extensions","id":65559,"avatar_url":"https://avatars.githubusercontent.com/u/65559?v=3","gravatar_id":"","url":"https://api.github.com/users/django-extensions","html_url":"https://github.com/django-extensions","followers_url":"https://api.github.com/users/django-extensions/followers","following_url":"https://api.github.com/users/django-extensions/following{/other_user}","gists_url":"https://api.github.com/users/django-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/django-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django-extensions/subscriptions","organizations_url":"https://api.github.com/users/django-extensions/orgs","repos_url":"https://api.github.com/users/django-extensions/repos","events_url":"https://api.github.com/users/django-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/django-extensions/received_events","type":"Organization","site_admin":false},"repo":{"id":155815,"name":"django-extensions","full_name":"django-extensions/django-extensions","owner":{"login":"django-extensions","id":65559,"avatar_url":"https://avatars.githubusercontent.com/u/65559?v=3","gravatar_id":"","url":"https://api.github.com/users/django-extensions","html_url":"https://github.com/django-extensions","followers_url":"https://api.github.com/users/django-extensions/followers","following_url":"https://api.github.com/users/django-extensions/following{/other_user}","gists_url":"https://api.github.com/users/django-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/django-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django-extensions/subscriptions","organizations_url":"https://api.github.com/users/django-extensions/orgs","repos_url":"https://api.github.com/users/django-extensions/repos","events_url":"https://api.github.com/users/django-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/django-extensions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django-extensions/django-extensions","description":"This is a repository for collecting global custom management extensions for the Django Framework. ","fork":false,"url":"https://api.github.com/repos/django-extensions/django-extensions","forks_url":"https://api.github.com/repos/django-extensions/django-extensions/forks","keys_url":"https://api.github.com/repos/django-extensions/django-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django-extensions/django-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django-extensions/django-extensions/teams","hooks_url":"https://api.github.com/repos/django-extensions/django-extensions/hooks","issue_events_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/django-extensions/django-extensions/events","assignees_url":"https://api.github.com/repos/django-extensions/django-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/django-extensions/django-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/django-extensions/django-extensions/tags","blobs_url":"https://api.github.com/repos/django-extensions/django-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django-extensions/django-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django-extensions/django-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/django-extensions/django-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django-extensions/django-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/django-extensions/django-extensions/languages","stargazers_url":"https://api.github.com/repos/django-extensions/django-extensions/stargazers","contributors_url":"https://api.github.com/repos/django-extensions/django-extensions/contributors","subscribers_url":"https://api.github.com/repos/django-extensions/django-extensions/subscribers","subscription_url":"https://api.github.com/repos/django-extensions/django-extensions/subscription","commits_url":"https://api.github.com/repos/django-extensions/django-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/django-extensions/django-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/django-extensions/django-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/django-extensions/django-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/django-extensions/django-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django-extensions/django-extensions/merges","archive_url":"https://api.github.com/repos/django-extensions/django-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django-extensions/django-extensions/downloads","issues_url":"https://api.github.com/repos/django-extensions/django-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/django-extensions/django-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/django-extensions/django-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django-extensions/django-extensions/labels{/name}","releases_url":"https://api.github.com/repos/django-extensions/django-extensions/releases{/id}","created_at":"2009-03-21T16:11:19Z","updated_at":"2015-08-12T09:17:04Z","pushed_at":"2015-08-13T10:01:14Z","git_url":"git://github.com/django-extensions/django-extensions.git","ssh_url":"git@github.com:django-extensions/django-extensions.git","clone_url":"https://github.com/django-extensions/django-extensions.git","svn_url":"https://github.com/django-extensions/django-extensions","homepage":"http://django-extensions.readthedocs.org","size":5283,"stargazers_count":2406,"watchers_count":2406,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":542,"mirror_url":null,"open_issues_count":42,"forks":542,"open_issues":42,"watchers":2406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722"},"html":{"href":"https://github.com/django-extensions/django-extensions/pull/722"},"issue":{"href":"https://api.github.com/repos/django-extensions/django-extensions/issues/722"},"comments":{"href":"https://api.github.com/repos/django-extensions/django-extensions/issues/722/comments"},"review_comments":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722/comments"},"review_comment":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/722/commits"},"statuses":{"href":"https://api.github.com/repos/django-extensions/django-extensions/statuses/fa6b0f5ebbafac2983284cd39d77a2e140136afe"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":29,"deletions":0,"changed_files":2}}