django admin manytomany获取所选字段值
和一般views中前端数据的获取一样。def save_model(self, request, obj, form, change):door_id_list= request.REQUEST.getlist('door')obj.save()print obj.id,'=========id'for door_id in door_id_list:print Door.objects.get(id=int(door_id)).door_namedoor_id_list就是获取的值,以前想的太复杂 原来这么简单
补充:Web开发 , Python ,