Django Custom Widget For ManyToMany field

自作多情 提交于 2019-12-03 21:06:26

问题


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


回答1:


django.contrib.admin.widgets.FilteredSelectMultiple



来源:https://stackoverflow.com/questions/3006401/django-custom-widget-for-manytomany-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!