Simon Willison’s Weblog


Friday, 27th June 2008

CookBookNewFormsFieldOrdering. Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict).

# 1:02 am / django, newforms, python, tip

OAuth for Google Data APIs (via) Awesome. Now, how’s OAuth support shaping up over at Twitter (who are serious offenders when it comes to encouraging the password anti-pattern, despite Twitter engineers being key to the creation of the original OAuth spec)?

# 7:49 am / apis, google, google-data, oauth, twitter Neat idea: write a CGI script that turns a proprietary API (in this case the SalesForce events API) in to standard ical format, then run it on your Mac’s local Apache server and subscribe to it from iCal.

# 8:09 am / apache, cgi, ical, mac, osx, salesforce, simon-fell

How-to: Full-text search in Google App Engine. Use search.SearchableModel instead of db.Model—it’s pretty rough at the moment which is probably why it’s still undocumented.

# 8:25 am / appengine, fulltextsearch, googleappengine, python, search

He/She/They: Grammar and Facebook. Facebook are going to start requiring gender information because foreign language translations wind up being too confusing when that information is not available. Aside: I wish they’d implement proper title elements on their blog posts.

# 9:06 am / facebook, gender, grammar, i18n, l10n, usability

The Cron Commandments. How to write well-behaved cron scripts, from Dean Wilson.

# 9:48 am / cron, deanwilson, unix

Browser Uploads to S3 using HTML POST Forms. I didn’t know you could do this: create a regular HTML form that gives people permission to upload direct to your own S3 bucket, using a signed JSON policy statement in a hidden form field to prevent third parties from abusing your S3 account.

# 12:11 pm / amazon, aws, forms, json, post, s3, signing

Capital FM London Traffic Map. We launched this today at GCap (née Global Radio). I’m particularly impressed with how well the team handled clustering the traffic cameras on the Google map.

# 6:22 pm / capitalfm, clustering, gcap, google-maps, london, traffic

Module Pattern Provides No Privacy... at least not in JavaScript(TM) (via) JavaScript variables hidden inside a closure aren’t as hidden as I thought—it turns out you can pass a closure as the second argument to eval (at least in Firefox) and “steal” private variables back out of it.

# 7:01 pm / closures, firefox, javascript, modulepattern, pete-michaux

2008 » June