zapier / django-drip

:droplet: Use Django admin to manage drip campaign emails using querysets on Django's User model.
MIT License
638 stars 137 forks source link

Support Count() aggregates for M2Ms. #25

Closed jsocol closed 11 years ago

jsocol commented 11 years ago

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.

bryanhelmig commented 11 years ago

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

:cake:

jsocol commented 11 years ago

Thanks!