2 Blog Entries for November 2008
The 56, 5 Book Meme
Hackworth had once taken his family out rowing on the pond in the park, and the ends of the yellow oars spun off compact vortices, and Fiona, who had taught herself the physics of liquids through numerous experimental beverage spills and in the bathtub, demanded an explanation for those holes in water.
The Diamond Age by Neal Stephenson
Pass it on:
- Grab the nearest book.
- Open it to page 56.
- Find the fifth sentence.
- Post the text of the sentence in your journal along with these # instructions.
- Don't dig for your favorite book, the cool book, or the intellectual ...
Testing Emails with Django
Django ticket #8638 titled, "Provide setting to disable e-mail sending", caught my eye as an interesting item to look into. As I looked into it, however, I came up with a pretty simple way to set up testing that involves some settings.py changes and about 4 lines of Python code.
The big piece of magic comes from Python's built-in smtpd library and the smtpd.DebuggingServer class, which discards all e-mails sent to it and prints them to stdout.
Let's use the class to create a local mail server that will discard and print all emails sent to ...