📜  django 获取新创建对象的 id - Python 代码示例

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

代码示例1
# just use the object id after saving
obj = ObjectTable()
obj.save()
print(obj.id)