2 Blog Entries tagged: debug


Testing Emails with Django

  • November 20th, 2008 (1 year, 3 months ago)

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 ...

Read the rest »

About this entry

Date Posted:
November 20th 2008 at 9:11:42 PM

Tagged:
debug, django, email, testing


Introducing the Django Debug Toolbar

  • September 19th, 2008 (1 year, 5 months ago)

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 ...

Read the rest »

About this entry

Date Posted:
September 19th 2008 at 9:09:56 PM

Tagged:
debug, django