Django Tutorial · Django Tutorial

Django Update Data

Learn all about Django Update Data in this comprehensive tutorial.

5 min read intermediate
  • To update records that are already in the database, we first have to get the record we want to update:

Update Records

To update records that are already in the database, we first have to get the record we want to update:

python

x will now represent the member at index 4, which is "Stale Refsnes", but to make sure, let us see if that is correct:

python

This should give you this result:

python

Now we can change the values of this record:

python

Execute this command to see if the Member table got updated:

python

Hopefully, the result will look like this:

python

Module quiz

2 questions
1

Which of the following is true about Django Update Data?

2

What is the most common pitfall when working with Django Update Data?

Answer all questions to submit.