Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20561 closed Uncategorized (fixed)

QuerySet .distinct([*fields]) documentation improvements

Reported by: Jani Tiainen Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

QuerySet does have .distinct([*fields]) method has optional feature to provide fields that are used on distinct. This feature is supported only by PostgreSQL.

In documentation there is a small note about fields being supported in PostgreSQL only. Almost all examples though uses fields provided which works only in PostgreSQL. It gives impression if reader does just a quick look of examples that passing parameters is common operation which works everywhere.

Examples should use common format that works for everybody and with a note add database spesifics.

Change History (3)

comment:1 by Anssi Kääriäinen, 11 years ago

Triage Stage: UnreviewedAccepted

I think there is room for some improvement here. Maybe the whole thing should be split to .distinct() and .distinct(*fields)?

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 577b0f91894469872974ad609b4fabca949cdc1b:

Fixed #20561 -- Emphasized that QuerySet.distinct([*fields]) is only supported by Postgres.

Thanks jtiai for the suggestion.

comment:3 by Tim Graham <timograham@…>, 11 years ago

In 430aae1b0db9fbcc15415b7bd9a14df1d88359cf:

[1.6.x] Fixed #20561 -- Emphasized that QuerySet.distinct([*fields]) is only supported by Postgres.

Thanks jtiai for the suggestion.

Backport of 577b0f9189 from master.

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