Opened 16 years ago
Closed 16 years ago
#10303 closed (fixed)
Contradiction in updating-multiple-objects-at-once doc?
Reported by: | gluckj | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
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: | no | UI/UX: | no |
Description
Hi,
I was reading http://docs.djangoproject.com/en/dev/topics/db/queries/#updating-multiple-objects-at-once 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 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.