I don't understand what values are in the django-autocomplete-light library.
我不明白django-autocomplete-light库中的值是什么。
Nor what validate_values() and choices_for_values() does.
也不是validate_values()和choices_for_values()的作用。
I am instantiating my autocomplete like this:
我正在实例化我的自动完成,如下所示:
forms.py
class MyForm(forms.Form):
search_field2 = autocomplete_light.ChoiceField('ExperimentationAutocomplete')
apps.py
class ExperimentationAutocomplete(autocomplete_light.AutocompleteListBase):
choices = ['aaaa', 'bbbb', 'cccc', 'dddd']
1 个解决方案
#1
0
Here is documentation of django-autocomplete-light for you. http://django-autocomplete-light.readthedocs.org/en/stable-2.x.x/
这里有django-autocomplete-light的文档。 http://django-autocomplete-light.readthedocs.org/en/stable-2.x.x/
#1
0
Here is documentation of django-autocomplete-light for you. http://django-autocomplete-light.readthedocs.org/en/stable-2.x.x/
这里有django-autocomplete-light的文档。 http://django-autocomplete-light.readthedocs.org/en/stable-2.x.x/