python - Django 1.8 - Signals - What's the difference between @receiver decorator and Signal.connect() method? -


they appear same thing. there difference in functionality, usage, etc? in circumstances should 1 used on other?

thanks

@receiver thin wrapper around signal.connect(). difference @receiver can accept not single signal, list or tuple of signals, , connect function each of signals.

if take @ source code, @receiver calls signal.connect(func) , returns original function.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -