[Fixed]-Django update an instance of a model

1👍

If you just need to update a few fields in that model, this may be the best approach:

address = Address.objects.create(building_name=building_name, postcode=postcode)

address.street = "new street"
address.save()
👤pygeek

0👍

If u are looking to update particular variable of a class –

address.Column_Name= Value
address.save()

You can return same address object with updated value.

Leave a comment