Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Support Count() aggregates for M2Ms. #25

Merged
merged 1 commit into from Feb 18, 2013
Merged

Support Count() aggregates for M2Ms. #25

merged 1 commit into from Feb 18, 2013

Conversation

jsocol
Copy link
Contributor

@jsocol jsocol commented Feb 11, 2013

Use __count for a field name and then treat define the rest of the
rule normally. In QuerySetRule.apply, the queryset is annotated behind
the scenes and then the filter is applied.

I wasn't sure how best to update the docs. This patch should apply cleanly to master, even though it was written against several other patches.

Use <m2m>__count for a field name and then treat define the rest of the
rule normally. In QuerySetRule.apply, the queryset is annotated behind
the scenes and then the filter is applied.

Conflicts:
	drip/models.py
@bryanhelmig
Copy link
Member

Very very cool, sorry for the delay. Let's make this so! :-)

🍰

bryanhelmig added a commit that referenced this pull request Feb 18, 2013
Support Count() aggregates for M2Ms.
@bryanhelmig bryanhelmig merged commit 260e316 into zapier:master Feb 18, 2013
@jsocol
Copy link
Contributor Author

jsocol commented Feb 19, 2013

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants