阅读背景:

如何让Django每个模型只运行一次命令

来源:互联网 

We're using django-MPTT for tree items and I have to create functionality for automatic email notifications when a tree item has been modified. Absolutely straight-forward using save signals but - if a parent item is modified, then n (n being number of childen items + parent item) emails are sent instead of just one (because parent's changes are automatically done to children). Is there a good way to prevent that and basically tell Django "Please send only one email per model"? We're using django-MPTT for tree items and I ha




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: