'Django determine if signals are necessary

Signals are a very useful part of Django, But I am having a hard time figuring out when they are really necessary. Take the following ambiguous example:

class FooBar(models.Model):
    some_field = models.something(#...)

    def func(self):
        # do something
        signals.some_signal.send(#...)

so this will send a signal whenever the func method is called. But one could also do the following:

def func(self):
    # do something
    # do what was in the receiver function

Are there any classifications of when to use a signal, and when to just include it in the original location?

It seems as though most situations will work both ways. Are signals just more optimal?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source