post_save signal on m2m field

Posted by Dmitry Shevchenko on Stack Overflow See other posts from Stack Overflow or by Dmitry Shevchenko
Published on 2008-10-27T17:09:41Z Indexed on 2010/04/28 20:17 UTC
Read the original article Hit count: 320

Filed under:
|

I have a pretty generic Article model, with m2m relation to Tag model. I want to keep count of each tag usage, i think the best way would be to denormalise count field on Tag model and update it each time Article being saved. How can i accomplish this, or maybe there's a better way?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-signals