2
我怎么能在这种情况下更改[book must etc...]
与真正的Django代码:Model.objects.filter([外部表])更新()
Book.objects.filter(processed=True, [book must have all the volumes belonging to it with property is_file_processed set to True]).update(status="PU")
型号:
class Book(models.Model):
title = models.CharField(max_length=100, blank=True)
...
class Volume(models.Model):
file = models.FileField(...)
...
is_file_processed = models.BooleanField(default=False)
book = models.ForeignKey(Book)