本文介绍了Django-autocomplete-light:允许自由文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 django-autocomplete-light == 1.4.13 中的 autocomplete_light.MultipleChoiceWidget 填写ManyToManyField.它仅允许从现有选择中选择项目.

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快速创建新项目?

Is there a way to allow users to create new items on the fly with django-autocomplete-light?

如果没有,那么是否可以通过支持此功能的良好Django集成来替代它呢?

If not, is there any solid alternative to it with good Django integration, which supports this feature?

推荐答案

有一个在GitHub上发布,由@blueyed提供.这是作者的答案:

There is an issue on GitHub by @blueyed. Here is an answer from the author:

那将是v1 https://github.com/yourlabs/django-autocomplete-light/tree/master/test_project/ajax_create

这篇关于Django-autocomplete-light:允许自由文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 09:32