development

debugging email with django

an easy way to get django to send emails direct to stdout ( and avoid connection refused errors )

in settings.py:

EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025

and at a shell:

python -m smtpd -n -c DebuggingServer localhost:1025

Subdomains on localhost

Say you are into developing locally, but want to have distinct domains for each project you've got.

IE -

foo.localhost
bar.localhost
jo-mama.localhost

Here's the easiest way I found for doing this in Ubuntu 9.10:

sudo nano /etc/hosts

Here you'll want to add in unique identifiers for each of the subdomains, such as:

127.0.0.1 localhost
127.0.0.2 foo.localhost
127.0.0.3 bar.localhost
127.0.0.4 jo-mama.localhost

sudo nano /etc/apache2/sites-available/subdomains

Syndicate content