liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

Autocompletion should honor ForeignKey.limit_choices_to #116

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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