from myapp.models import User User.objects.all().update(status='inactive')
from myapp.models import Product Product.objects.all().update(price=F('price') * 1.1)
from myapp.models import Book book = Book.objects.get(pk=1) book.title = 'New Title' book.save()While `.update()` is a very powerful tool for batch updating records, it cannot be used to update a single record. In this case, we must use `.get()` or `.filter()` to retrieve the record and then modify its fields before calling `.save()`.