Creating Select form fields with currencies and countries using Babel and WTForms

By on August 4th, 2010 in Python Comments (1)

A quick tutorial on how to create some nifty currency and country select fields using WTForms. This was sort of a headache to figure out, which is why I’m sharing it. If you have a cleaner way to do this (particularly the country list), please comment, because I’m highly dissatisfied with hardcoding the countries and…

Read more…


Sort a Python list by dictionary key

By on May 5th, 2010 in Python Comments (4)

I probably should have known how to do this innately, it’s that simple, but I didn’t. So for the benefit of fellow feckless Pythonistas, here is how to sort a list of dictionaries based on a key in the dictionary. Say I have a list of dictionaries where each dictionary represents data for a person…

Read more…


Displaying fieldsets with Jinja2 and Django forms, the quick way

By on April 30th, 2010 in Python Leave a Comment

We had two problems to solve: we wanted to use fieldsets with Django forms, and the follow-up issue, making that custom rendering Jinja2-compatible. There are plenty of awesome libraries/snippets to display forms as fieldsets, including django-form-utils. I wanted a quick and dirty and method of doing this. So here it is: step 1, add a…

Read more…


Jobs makes a valid point: intermediate layers hinder the progress of the platform.

By on April 11th, 2010 in Technology Comments (18)

In his response to the Section 3.3.1 changes, Steve Jobs makes a very valid point that has been largely glossed over by the Apple vs Adobe narrative that is playing out on the web right now: We’ve been there before, and intermediate layers between the platform and the developer ultimately produces sub-standard apps and hinders…

Read more…


Twitter, Apple, Facebook: The perils of building on top of someone else’s platform.

By on April 9th, 2010 in Technology Comments (7)

A few interesting things have happened this past week that should remind us all of the perils of building your business on top of someone else’s platform: Fred Wilson’s recent post describing the future of the Twitter platform has left developers wondering if Twitter is going to integrate certain core features (URL shorteners, photo sharing…

Read more…


Jinja2 and Django 4ever

By on March 15th, 2010 in Python Comments (4)

My goal is to stop hating Django. Our team has been bouncing back and forth between using Django and Pylons for the creation of the web front end for ChompStack, a restaurant-oriented iPhone app site with an admin panel for easy data management. In the beginning, there was Django, and it was good. But gradually…

Read more…


Top 5 iPad apps I’d pay good money for

By on March 5th, 2010 in iOS Comments (5)

Note: this is just my personal list of apps I would actually be willing to pay for if someone built them. Some of these ideas may already exist in some form on the iPhone, but I think they would work much better with the iPad’s large touchscreen. A recipe manager I do a lot of…

Read more…


Adding extra fields to a model form in Django’s admin

By on February 11th, 2010 in Python Comments (23)

I ran into this problem recently and found that the Django documentation wasn’t exactly clear on how to solve it, so I’ve provided an example in case anyone else needs to do the same thing. My goal was to add an extra form field to one of my model objects that represented a property which…

Read more…


PyClutter video tutorial

By on February 9th, 2010 in Python Comments (3)

As usual, we’re learning together: today I decided that I would like to be able to play video in our Bazooka (PyClutter-based) framework, so I set out to write a Bazooka video class. The source code for Bazooka, including this video class, is in our git repository here. First, make sure you have PyClutter 0.9.2…

Read more…


Clutter links

By on February 8th, 2010 in Python Leave a Comment

Bazooka is built on top of the Python bindings for the 0.9.2 version of the Clutter Toolkit, or whatever version the latest stable Python bindings are at. Occasionally I go trolling for additional Clutter links, and I thought I’d post a few of my finds here for easy access. Latest stable clutter docs Latest stable…

Read more…