Starting with Django in Leopard

As I’ve written earlier, I’m playing with Django these days. It’s a refreshing change, I must say, even if I admit that I prefer Ruby’s syntax to Python’s. Of course that’s just a purely subjective impression (I’m writing this while I try to avoid the rotten tomatoes thrown by angry pythonistas reading this) that does nothing to do with the power of the Python language + framework, which is by all means absolutely impressive.

In any case, I had to install a working Django environment in my machine, and while following the excellent and free Django Book instructions, this is what I did in my Leopard installation to have it up and running (Leopard already comes bundled with Subversion 1.4.4, Python 2.5.1 and SQLite 3.4.0, so you don’t need to do anything about them): Continue reading

Django & Leopard & the UTF-8 error

If you use Django on Leopard, you might encounter a strange “Locale UTF-8 not found” error when running your application. This is due to a bug in Terminal.app, albeit an easy to fix one: just go to the Preferences pane / “Settings” page / “Advanced” tab and uncheck the “Set LANG environment variable on startup” checkbox. Reopen your Terminal session, load the Django application and voilà! Your bug has disappeared. The screenshot below might help too:

solution.png

Hope this helps!

PS: yes, I’m doing Django and hence Python these days ;)