Monthly Archives: November 2006

Django :: i18n

What’s up with so many languages? E.g. in Switzerland there are four official languages, and in Norway there are two: bokmÃ¥l and nynorsk (details). I’ll be describing what I had to do to get a good user experience with these … Continue reading

Posted in django | Leave a comment

Python :: flatten

Although it can seem like a CS excercise, everyone will sooner or later have to write a “flatten” function — a function that takes a nested “list” and makes it one-dimensional: it should also handle Python data types in a … Continue reading

Posted in Python | Leave a comment

Django :: making a date dropdown field

It seems like it is hard to input valid dates in a free-form text format for a significant portion of users. Personally, I don’t like many of the popup calendar widgets since they usually rely on Javascript for rendering — … Continue reading

Posted in django | Leave a comment

Python :: defprop – a very simple idiom for defining properties

Most attempts at making it easier to define properties in Python seem to quickly descend into metaclass obscurity. Metaclasses can surely solve the problem for an appropriate definition of solve, but “Explicit is better than implicit”, and “Simple is better … Continue reading

Posted in Python | Leave a comment