#18145 closed Cleanup/optimization (fixed)
Documentation for unique_together is confusing
Reported by: | Roy Smith | Owned by: | Raúl Cumplido |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | raulcumplido@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
At https://docs.djangoproject.com/en/1.4/ref/models/options/#unique-together, it says:
Sets of field names that, taken together, must be unique: unique_together = (("driver", "restaurant"),) This is a list of lists of fields that must be unique when considered together.
The words "set", and "list" refer to specific python datastructures, and the example uses neither of those -- it uses tuples. This should be cleaned up. I suspect the proper wording is "a iterable of iterables".
Change History (6)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:3 by , 12 years ago
Has patch: | set |
---|
fixed at github with pull request at:
https://github.com/django/django/pull/118
comment:4 by , 12 years ago
New commit added to the pull request with a little modification from the comments:
https://github.com/django/django/pull/118
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I'd say "tuple of two-tuples", but yeah, this is slightly imprecise.