📜  django 编辑对象外键 id - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.750000             🧑  作者: Mango

代码示例2
b = Blog.objects.get(pk=1)
Entry.objects.filter(pk=17).update(blog=b)

#1)Need to select row/rows which you wanna update
#2) Use function update