My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 65: Allow select_related in model methods
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Sep 2010


 
Reported by izimo...@gmail.com, Dec 18, 2009
The attached patch allows to pass an extra keyword argument
"select_related" to the following methods:

- get_ancestors()
- get_children()
- get_descendants()
- get_next_sibling()
- get_previous_sibling()
- get_siblings()

and in the util function 'drilldown_tree_for_node()'.

It can reduce the number of queries in many usecases (eg: breadcrumbs,
menus, etc...).
select-related.diff
5.6 KB   View   Download
Sep 2, 2010
Project Member #1 craig.ds@gmail.com
Can't you just do something like:

    n.get_descendants().select_related()

Unless I'm missing something, I'm not inclined to add this patch.
Status: Chatting
Sep 3, 2010
Project Member #2 craig.ds@gmail.com
(No comment was entered for this change.)
Status: WontFix

Powered by Google Project Hosting