Code from the book "Tango with Django"