I'm speaking at PGCon 2017 (The PostgreSQL Conference)

Cracking passwords in Postgres with Python and Django password hashers

pgcon-2017-logo

Later this week, I'll be heading to Ottawa, Ontario to attend PGCon 2017 where I'll be delivering a talk entitled Pgcrypto Avasat! A study in Django's password hashers.

If that doesn't get you excited... I don't know what will!

Read more

Generating a PowerPoint from text files

Annoy your colleagues with Python

One of my nerdy colleagues, @mattcaldwell, just gave a neat presentation at a Django-District Meetup on using vim+tmux as Django IDE. To keep it real, he created his presentation using

Read more

Python performance: string formatting with .format vs %

Which is faster?

Python 2.6 introduced the str.format() method for formatting strings which provides a much more flexible alternative to the older modulo (%) based string formatting. But which one performs better? Let's test it out by repeating a simple string format a million times ...

Read more

Tomatohater.com now a Pelican/GitHub site

Statically generated for cms-less publishing

This site is now completely static, generated by Pelican and hosted on GitHub Pages. Ridiculously simple and elgant.

The evolution of tomatohater.com:

Dates                    Technology                     Hosting
-----------------------  ...

Read more

Migrating a Django app to Heroku

Heroku supports Python! What are we waiting for?

As a Python and Django kind of guy, I had always been jealous of the Ruby on Rails folks. This has nothing at all to do with the framework itself. No, no, no.... Django all the way. It was the Heroku cloud application platform that had me longing.

Yes, I could run my Django application on Google App Engine, but that requires all sorts of hackery and my app ended up an abomination of the original... too unnatural for my ...

Read more

Why Django?

In 5 words or less… Why do you use Django?

I have been a heavy Django developer, architect, and evangelist since about 2006 when Nowell Strite and I first saw a presentation by Adrian and Jacob at OSCON. We brought Django back to PBS where it quickly became our standard development platform.

Read more

Faetus: An FTP interface to Amazon S3 file storage.

An FTP interface to Amazon S3 file storage.

What?

Faetus is an FTP server that translates FTP commands into Amazon S3 API calls providing an FTP interface on top of Amazon S3 storage.

image1

Why?

Amazon's S3 API is awesome and there are plenty of excellent libraries that make this very simple. However, sometimes you don't have control over a system, ...

Read more

Concatenating strings in Django templates

Cheap ass hack to append a string within Django templates.

You might think that joining two strings in a Django template would have been simple and straightforward. In modern versions of Django, we can achieve it using the add filter.

{{ "Mary had a little"|add:" lamb." }}

However, in ...

Read more

DCPython: Architecture at PBS

Slides from DCPython meetup on Jun 7, 2011

Edgar and I had the pleasure of presenting at the DCPython meetup last night about how PBS uses Python, Django, Celery, Solr and Amazon Web Services (autoscaling EC2, RDS) to power many of our sites and services. We focused primarily on the COVE (video) and Merlin (content) APIs since those probably have the most interesting ...

Read more

mod_wsgi and the HTTP Authorization header

A friendly reminder for myself to RTFD!

If one is building a WSGI application on mod_wsgi and one wants this WSGI application to handle HTTP authentication, it is likely that one will need access to the "Authorization" HTTP header at some point. Had one read the documentation, one would have already understood that mod_wsgi does not pass this header to your WSGI application by default. This is probably a very good thing.

To tell mod_wsgi to pass the Authorization header through to your application, just set the ...

Read more