Update Many Objects in the Database

Report a typo

You have a model Task with fields description, is_done, priority:

class Task(models.Model):
    description = models.CharField(max_length=256)
    is_done = models.BooleanField()
    priority = models.IntegerField()

Update priority for all tasks in the database to 1.

Write a program in Python 3





___

Create a free account to access the full topic