2 Blog Entries tagged: debug
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 ...
Introducing the Django Debug Toolbar
Genesis
For some time I've been subscribed to the Symfony Project's RSS feed and have enjoyed their weekly summaries and watching another web framework grow. One of the ideas that I found while scanning a particular blog post was their "Web Debug Toolbar". I was inspired and the very same day I started the Django Debug Toolbar.
Basic Structure
I liked the fact that Symfony's Debug Toolbar was made up of distinct panels, each of which had their own rendering methods. I created the Django Debug Toolbar similarly with a single toolbar that contained many panels. The ...