Skip to content
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 support for django __ syntax to add_related_count rel_field #763

Merged
merged 1 commit into from Oct 20, 2020

Conversation

ErwinJunge
Copy link
Contributor

This PR adds support for __ syntax to the rel_field argument of the add_related_count method.

The rationale is that sometimes you might want to count objects that are a multistep relation away from the mptt model. I've added a model to the testsuite (SubItem) and associated tests to showcase the idea and test the implementation.

@matthiask matthiask merged commit 4090141 into django-mptt:master Oct 20, 2020
@matthiask
Copy link
Member

Thanks!

@ErwinJunge
Copy link
Contributor Author

@matthiask can you help me out a bit with achieving my hacktoberfest goals and apply a hacktoberfest-accepted label to this PR? Alternatively, if you want to participate in hacktoberfest, you could apply a hacktoberfest topic to the repository :)

@matthiask
Copy link
Member

@ErwinJunge Done!

(I received a few spammy pull requests at the beginning of october, so I don't know whether I want to add the label to the repository. )

@ErwinJunge
Copy link
Contributor Author

Awesome, thanks :)

Sorry to hear about people spamming, I understand that's the reason for the explicit approval process now. Probably better to leave the label off then, it might be more trouble than it's worth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants