Opened 8 years ago

Closed 8 years ago

Last modified 8 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 by Simon Charette, 8 years ago

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 by Tim Graham, 8 years ago

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

comment:3 by Simon Charette, 8 years ago

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

comment:4 by GitHub <noreply@…>, 8 years ago

Resolution: needsinfofixed

In a05d86a:

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

comment:5 by Tim Graham <timograham@…>, 8 years ago

In bc151b69:

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

Backport of a05d86a69a7f11f00032b8d7846932b139c670e0 from master

comment:6 by Tim Graham <timograham@…>, 8 years ago

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