In Django

Lets say you create an object using Django Model forms and want to access the newly created object imminently. This can be done by simply assigning a variable to the saved instance.

form = ObjectForm(request.POST)

if form.is_valid()

item = form.save()

print(item.name)

No that we assign item to the saved form instance we can access the newly created items attributes immediately.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.