Django CustomToMany字段的自定义小部件 [英] Django Custom Widget For ManyToMany field
本文介绍了Django CustomToMany字段的自定义小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
感谢
解决方案
django.contrib.admin.widgets.FilteredSelectMultiple
Does anyone know of a widget that displays 2 select boxes. One shows a list of all object in a model and the other shows the objects which have been selected. The user can then select an object from the first list, click an >> button which moves it to the 'selected' list. Then when the form is saved the objects in the selected list are saved in the manytomany field.
Thanks
解决方案
django.contrib.admin.widgets.FilteredSelectMultiple
这篇关于Django CustomToMany字段的自定义小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文