Opened 12 years ago

Last modified 9 years ago

#19193 closed New feature

Save only one field to database which refereced to FieldFile — at Initial Version

Reported by: 3dflex@… Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.db.models.fields.FieldFile:

def save(self, name, content, save=True):
....

if save:

self.instance.save(update_fields=[self.field.name])

....

or:

def save(self, name, content, save=True, kwargs)
....

if save:

self.instance.save(kwargs)

....

So, we get rid of re-saving fields when updating

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top