Opened 7 years ago

Closed 7 years ago

#10303 closed (fixed)

Contradiction in updating-multiple-objects-at-once doc?

Reported by: gluckj Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: updating-multiple-objects-at-once
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



I was reading just now.

It first says:
"You can only set non-relation fields and ForeignKey fields using this method, and the value you set the field to must be a hard-coded Python value (i.e., you can't set a field to be equal to some other field at the moment)."

But later says:
"Calls to update can also use F() objects to update one field based on the value of another field in the model."

Is this a contradiction?

(Thanks, BTW, for your awesome documentation -- I'm really enjoying it!)

-- jg

Change History (2)

comment:1 Changed 7 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Yes, this is a contradiction. The F() syntax is a relatively recent addition, and when I added the documentation for F(), I didn't remove the old note about only using hard-coded values. I'll update the docs.

comment:2 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [9846]) Fixed #10303 -- Corrected a contradiction in the docs regarding the capabilities of the .update() clause that was introduced by the documentation for F() expressions. Thanks to gluckj for the report.

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