Answers for "django get id of newly created object"

0

django get id of newly created object

# just use the object id after saving
obj = ObjectTable()
obj.save()
print(obj.id)
Posted by: Guest on September-30-2021

Code answers related to "django get id of newly created object"

Python Answers by Framework

Browse Popular Code Answers by Language