-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add include_self=False
parameter to functions which return lists/querysets
#46
Comments
We have a current workaround for this that's sub-optimal as it doesn't allow us to work with a queryset after defining this. node_children_including_self = [*node.get_children_queryset(), node] |
@jvacek the request is clear, frankly I don't like very much the fact that |
Fair enough, the naming convention of this is not exactly the clearest in
I would assume that this would follow the traversal method you've chosen. If that's pre-order, then it would be at the start. |
django_mptt
had a nice option to include the current node in the functions which return descendants, children, etc. It is documented hereIt would be nice to be able to call
get_children(include_self=True)
orget_children_queryset(include_self=True)
, and get the node in the list as wellThe text was updated successfully, but these errors were encountered: