The Django framework includes the concept of signals, which are similar to events in JavaScript. There is a handful of built-in signals that you can use to trigger actions before and after the initialization of a model, saving or deleting an instance, migrating the database schema, handling a request, and so on. Moreover, you can create your own signals in your reusable apps and handle them in other apps. In this recipe, you will learn how to use signals to send emails to administrators whenever a specific model is saved.
Using signals to notify administrators about new entries
Getting ready
Let's start with the viral_videos app that we created in the Using database query expressions recipe.