Django TutorialLesson 13Free preview
Django Update Data
This lesson is part of Django · All levels
Summary
To update the data, take the object from the database, change its attribute, and then call save(). Changes are only saved after the save() is called. This applies to all fields on the model.
Key points
- Take the object with objects.get() and then change the attribute
- Call save() to save changes
- New changes are effective after save()
- Can update multiple fields at once
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.