Chapter 9, pp. 103-106, "Sessions".  Code to display flash message won't actually work, though, because it depends on /newsletter being POSTed; the form is actually submitted via AJAX.