Updating objects

Now, change the title of the post to something different and save the object again:

>>> post.title = 'New title'
>>> post.save()

This time, the save() method performs an UPDATE SQL statement.

The changes you make to the object are not persisted to the database until you call the save() method.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset