Opened 13 years ago
Last modified 10 years ago
#19193 closed New feature
Save only one field to database which refereced to FieldFile — at Initial Version
| Reported by: | 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
Note:
See TracTickets
for help on using tickets.