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.
我正在使用django-autocomplete-light == 1.4.13中的autocomplete_light.MultipleChoiceWidget来填充ManyToManyField。它只允许从现有选择中选择项目。
Is there a way to allow users to create new items on the fly with django-autocomplete-light?
有没有办法允许用户使用django-autocomplete-light动态创建新项目?
If not, is there any solid alternative to it with good Django integration, which supports this feature?
如果没有,有没有任何可靠的替代品与良好的Django集成,它支持此功能?
1 个解决方案
#1
0
There is an issue on GitHub by @blueyed. Here is an answer from the author:
@blueyed在GitHub上存在问题。以下是作者的回答:
Here's an example for v2 https://github.com/yourlabs/django-autocomplete-light/tree/master/autocomplete_light/example_apps/create_choice_on_the_fly
以下是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
那个将用于v1 https://github.com/yourlabs/django-autocomplete-light/tree/master/test_project/ajax_create
#1
0
There is an issue on GitHub by @blueyed. Here is an answer from the author:
@blueyed在GitHub上存在问题。以下是作者的回答:
Here's an example for v2 https://github.com/yourlabs/django-autocomplete-light/tree/master/autocomplete_light/example_apps/create_choice_on_the_fly
以下是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
那个将用于v1 https://github.com/yourlabs/django-autocomplete-light/tree/master/test_project/ajax_create