[Django] #20561: QuerySet .distinct([*fields]) documentation improvements

17 views
Skip to first unread message

Django

unread,
Jun 5, 2013, 2:28:43 AM6/5/13
to django-...@googlegroups.com
#20561: QuerySet .distinct([*fields]) documentation improvements
-------------------------------+--------------------
Reporter: jtiai | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/20561>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 5, 2013, 2:34:50 AM6/5/13
to django-...@googlegroups.com
#20561: QuerySet .distinct([*fields]) documentation improvements
-------------------------------+------------------------------------

Reporter: jtiai | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by akaariai):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/20561#comment:1>

Django

unread,
Jul 5, 2013, 7:21:18 AM7/5/13
to django-...@googlegroups.com
#20561: QuerySet .distinct([*fields]) documentation improvements
-------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 1.5
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"577b0f91894469872974ad609b4fabca949cdc1b"]:
{{{
#!CommitTicketReference repository=""
revision="577b0f91894469872974ad609b4fabca949cdc1b"
Fixed #20561 -- Emphasized that QuerySet.distinct([*fields]) is only
supported by Postgres.

Thanks jtiai for the suggestion.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20561#comment:2>

Django

unread,
Jul 5, 2013, 7:22:04 AM7/5/13
to django-...@googlegroups.com
#20561: QuerySet .distinct([*fields]) documentation improvements
-------------------------------+------------------------------------
Reporter: jtiai | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 1.5

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"430aae1b0db9fbcc15415b7bd9a14df1d88359cf"]:
{{{
#!CommitTicketReference repository=""
revision="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.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20561#comment:3>

Reply all
Reply to author
Forward
0 new messages