August 2016
Beginner to intermediate
717 pages
15h 24m
English
Django framework has a 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 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.
Let's start with the viral_videos app that we created in the Using database query expressions recipe.
Follow these steps to create notifications to administrators: ...
Read now
Unlock full access