问题
I am using autocomplete_light.MultipleChoiceWidget
from django-autocomplete-light==1.4.13
to fill in a ManyToManyField.
It only allows selecting items from existing choices.
Is there a way to allow users to create new items on the fly with django-autocomplete-light?
If not, is there any solid alternative to it with good Django integration, which supports this feature?
回答1:
There is an issue on GitHub by @blueyed. Here is an answer from the author:
Here's an example for v2 https://github.com/yourlabs/django-autocomplete-light/tree/master/autocomplete_light/example_apps/create_choice_on_the_fly
That one would be for v1 https://github.com/yourlabs/django-autocomplete-light/tree/master/test_project/ajax_create
来源:https://stackoverflow.com/questions/24243853/django-autocomplete-light-allow-free-text