{"action":"created","issue":{"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/684","repository_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light","labels_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/684/labels{/name}","comments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/684/comments","events_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/684/events","html_url":"https://github.com/yourlabs/django-autocomplete-light/issues/684","id":154700974,"number":684,"title":"ModelForm : pass the object's id as extra parameter in AJAX call","user":{"login":"olivierdalang","id":1894106,"avatar_url":"https://avatars.githubusercontent.com/u/1894106?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierdalang","html_url":"https://github.com/olivierdalang","followers_url":"https://api.github.com/users/olivierdalang/followers","following_url":"https://api.github.com/users/olivierdalang/following{/other_user}","gists_url":"https://api.github.com/users/olivierdalang/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierdalang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierdalang/subscriptions","organizations_url":"https://api.github.com/users/olivierdalang/orgs","repos_url":"https://api.github.com/users/olivierdalang/repos","events_url":"https://api.github.com/users/olivierdalang/events{/privacy}","received_events_url":"https://api.github.com/users/olivierdalang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-13T12:30:44Z","updated_at":"2016-05-13T12:47:41Z","closed_at":null,"body":"Hi !\r\n\r\nI have a `Team` model and a `Member` model. The `Team` model has a `captain` field.\r\n\r\nNow, in my ModelForm, for the `captain` field, I want to filter the autocomplete to show only members of the team that I'm editing. This means I need to pass a `team_id` parameter alongside the `q` parameter.\r\n\r\nI think it's a fairly commun scenario, just like `forward=['continent']`. I googled the issue and found some links, but they all are quite complex hacks combining advanced django and javascript, and I couldn't make them work (I'm no javascript expert).\r\n\r\nI'd suggest either :\r\n- add an option like `forward` but to send the modelform's instance's pk instead\r\n- document the easiest way to get that result\r\n\r\nThanks a lot for the awesome module !"},"comment":{"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/comments/219033134","html_url":"https://github.com/yourlabs/django-autocomplete-light/issues/684#issuecomment-219033134","issue_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/684","id":219033134,"user":{"login":"toudi","id":81148,"avatar_url":"https://avatars.githubusercontent.com/u/81148?v=3","gravatar_id":"","url":"https://api.github.com/users/toudi","html_url":"https://github.com/toudi","followers_url":"https://api.github.com/users/toudi/followers","following_url":"https://api.github.com/users/toudi/following{/other_user}","gists_url":"https://api.github.com/users/toudi/gists{/gist_id}","starred_url":"https://api.github.com/users/toudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toudi/subscriptions","organizations_url":"https://api.github.com/users/toudi/orgs","repos_url":"https://api.github.com/users/toudi/repos","events_url":"https://api.github.com/users/toudi/events{/privacy}","received_events_url":"https://api.github.com/users/toudi/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T12:47:41Z","updated_at":"2016-05-13T12:47:41Z","body":"hmm I just thought that if there would be an additional field ( pk ) rendered as a hidden Django field, then it could be passed via forward() like any other.. am I wrong?"}}