Chapter 7: Working with Messages, Email Notifications, and PDF Reports
In this chapter, we will work with the Django messages framework, email notifications and templates, and PDF documents. In order for us to know that emails are actually being sent from our system and that they are rendered correctly in different email clients, we will be using a free third-party service to capture all of our outgoing emails. By capturing all outgoing emails, we can prevent development and test emails from being sent to people who should not be seeing them yet. We will use HTML, CSS, and the Django template language to create email and PDF report templates. Both will use context data just like how we passed context into templates in Chapter 4, URLs, Views, and Templates.
In this chapter, we will cover the following:
- Creating a test environment for capturing all emails sent by the app
- Using the Django messages framework to create flash messages and custom message levels
- Creating...