I integrated autocomplete light with my django app.
In my registry i'm doing the following:
class HostAutocomplete( autocomplete_light.AutocompleteModelBase ):
search_fields = [ 'hostname' ]
choices = Host.objects.all()
In my form i have:
hosts=autocomplete_light.MultipleChoiceField('HostAutocomplete')
Autoocomplete is working fine but the list which i'm getting contains only 20 items. Database has many more entries. What could be the issue?
Add the limit_choices
property to your autocomplete class:
class HostAutocomplete(autocomplete_light.AutocompleteModelBase):
...
limit_choices = 50