Libravatar is a fairly simple Django application.

Here's what you'll find in the main repository:

As far as getting your head around the Django-specific code, have a look at the excellent manual they provide.