liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autocompletion should honor ForeignKey.limit_choices_to

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Declare a foreign key field in a model with "limit_choices_to" set
2. Use ForeignKeyAutocompleteAdmin
3. Start typing for a related object, it shows all that match the text.

This is the default behavior. But it should filter by the text criteria
plus all keyword filters (Q objects should be are allowed too). In fact, it
should be simple to accomplish, since it's only needed to AND the text's Q
and a Q object built from "limit_choices_to" field attribute.

What version of the product are you using?
autocomplete-rf

Original issue reported on code.google.com by gmandx on 19 Nov 2009 at 3:38