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
Post a Comment