Django: Say Hello to Unicode

After weeks of testing, the Django unicode-branch was merged into trunk today. This changeset brings huge improvements to unicode-awareness of Django and it also fixes a lot of unicode-related bugs. From the announcement at django-users list:

This should be backwards-compatible for all practical purposes (providing you only use ASCII data). The only real difference you will notice in that case is that model fields are Unicode strings instead of bytestrings in type, but since they are ASCII data anyway, that shouldn’t make any real difference.

See Unicode data in Django and Porting Applications (The Quick Checklist) for more.

Furthermore, there was also another great commit today fixing a bug that has always been in top five of my personal “The things I hate most about Django”-list. Changeset 5608 adds finally “unicode-aware slugify filter (in Python) and better non-ASCII handling for the Javascript slug creator in admin”. Until today, slugify-function converted a typical non-english title like “Tässä on älyttömästi ääkkösiä” into (totally unreadable) “tss-on-lyttmsti-kksi” which of course sucks big time when every other slugify function on the planet makes it something like “tassa-on-alyttomasti-aakkosia” (which is totally readable).

I’m really, really happy that Django is slowly but firmly maturing into a unicode-friendly framework. Kudos for Malcolm Tredinnick for his huge efforts on the unicode-branch and also big thanks to everyone who helped with testing and bugfixes!

Django unicode-branch: testers wanted

The long-waited unicode-branch is finally at a stage that wider community testing is needed. Read the notification at django-users mailing list.

Malcolm has done terriffic job with the branch and there are already fairly solid documentation available. For most people, the short checklist (five steps, maximum!) is all you need to convert your applications to handle unicode well. If you want more information, check the detailed documentation from the trunk.

Using this branch means an end for the numerous unicode-related problems (for most of them, anyway) when using Django. So, this is a must for every djangonaut who is living in the Real World 😉

Go on, get on with it! 🙂