"...then a call to Book.objects.select_related('person',
'person{{{__}}}city').get(id=4) will cache the related Person and the
related City:"
and the sample code that follows it reads:
"b = Book.objects.select_related('person{{{__}}}city').get(id=4)"
The arguments passed to select_related do not match.
The error is present in both the Dev docs and the 1.7 docs.
Pardon the odd formatting on the double underscores. I tried to escape
them in about eight different ways, and this was the best I could do.
--
Ticket URL: <https://code.djangoproject.com/ticket/23094>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0
Old description:
> On the QuerySet API documentation page, under the section for
> select_related
> (https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_related),
> in the section about following foreign keys, the documentation reads:
>
> "...then a call to Book.objects.select_related('person',
> 'person{{{__}}}city').get(id=4) will cache the related Person and the
> related City:"
>
> and the sample code that follows it reads:
>
> "b = Book.objects.select_related('person{{{__}}}city').get(id=4)"
>
> The arguments passed to select_related do not match.
>
> The error is present in both the Dev docs and the 1.7 docs.
>
> Pardon the odd formatting on the double underscores. I tried to escape
> them in about eight different ways, and this was the best I could do.
New description:
On the QuerySet API documentation page, under the section for
select_related
(https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_related),
in the section about following foreign keys, the documentation reads:
"...then a call to `Book.objects.select_related('person',
'person__city').get(id=4)` will cache the related Person and the related
City:"
and the sample code that follows it reads:
{{{
b = Book.objects.select_related('person__city').get(id=4)
}}}
The arguments passed to select_related do not match.
The error is present in both the Dev docs and the 1.7 docs.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/23094#comment:1>
* owner: nobody => timo
* status: new => assigned
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/23094#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"5f919b9c81a26832f98033335a601ec1ca718db7"]:
{{{
#!CommitTicketReference repository=""
revision="5f919b9c81a26832f98033335a601ec1ca718db7"
Fixed #23094 -- Removed redundant argument in select_related() example.
Thanks thegeekofalltrades at gmail.com for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23094#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"5822ca6c108e4cde134e55632dbaf79aeead1777"]:
{{{
#!CommitTicketReference repository=""
revision="5822ca6c108e4cde134e55632dbaf79aeead1777"
[1.7.x] Fixed #23094 -- Removed redundant argument in select_related()
example.
Thanks thegeekofalltrades at gmail.com for the report.
Backport of 5f919b9c81 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23094#comment:4>