Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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 Jannis Leidel, 12 years ago

Triage Stage: UnreviewedAccepted

I'd say "tuple of two-tuples", but yeah, this is slightly imprecise.

comment:2 by Raúl Cumplido, 12 years ago

Cc: raulcumplido@… added
Owner: changed from nobody to Raúl Cumplido

comment:3 by Raúl Cumplido, 12 years ago

Has patch: set

fixed at github with pull request at:
https://github.com/django/django/pull/118

comment:4 by Raúl Cumplido, 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 Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [55ffcf8e7b414a39e2dfc9c9eb4c5d3fa548e78e]:

Fixed #18145 -- Improved documentation of unique_together type fields

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

In [342e8a6246d0c3893ecbe80584f30d6d0f05aa6f]:

[1.4.X] Fixed #18145 -- Improved documentation of unique_together type fields

Backport of 55ffcf8e7b from master

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