Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#26918 closed Cleanup/optimization (fixed)

Documentation Clarification on pre_save signal updated_fields

Reported by: Daniel Stanton Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Will updated_fields be populated if the object is being created, or only when updated?

What would updated_fields content look like/format/layout?

https://docs.djangoproject.com/en/1.9/ref/signals/#pre-save

For all supported versions.

Change History (6)

comment:1 Changed 3 years ago by Simon Charette

Resolution: needsinfo
Status: newclosed

Will updated_fields be populated if the object is being created, or only when updated?

We already document that using update_fields will force the object to be updated

What would updated_fields content look like/format/layout?

The linked documentation makes it clear to me that update_fields is a set().

Can you formulate a documentation adjustment in the form of a patch or an annotated text? I'm not sure about what you are suggesting here.

comment:2 Changed 3 years ago by Tim Graham

When I saw this ticket, I thought the following might help: PR.

comment:3 Changed 3 years ago by Simon Charette

@stantond, please confirm the patch suggested by Tim is along the clarification you had in mind.

comment:4 Changed 3 years ago by GitHub <noreply@…>

Resolution: needsinfofixed

In a05d86a:

Fixed #26918 -- Clarified source of pre/post_save update_fields argument.

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In bc151b69:

[1.9.x] Fixed #26918 -- Clarified source of pre/post_save update_fields argument.

Backport of a05d86a69a7f11f00032b8d7846932b139c670e0 from master

comment:6 Changed 3 years ago by Tim Graham <timograham@…>

In c8d1662:

[1.10.x] Fixed #26918 -- Clarified source of pre/post_save update_fields argument.

Backport of a05d86a69a7f11f00032b8d7846932b139c670e0 from master

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