I never really encountered a bug in Django. Most of the stuff I did in the past was done by many people before, but since we dig deeper with renooble, we reach points were only a small subset of Django users is having the same issue.

One of the problem is a bug with GeoDjango which drove me nuts the past days. I tried everything, tried multiple versions of codes, setups, etc. posed my questions on Stackoverflow.com and emailed the GeoDjango mailing list, but I could not get my head around the issue.

Fact is if you work with Django 1.3 (I do) and have installed PostgreSQL 9.1 (I do too), Django translates your geo positions with zero bytes and PostgreSQL does not allow \000 bytes as part of the INSERT statement - so boom, your query fails and your app stops.

Luckily, after a long time of debugging and searching, I found a patch online. Simply change your


with the code changes listed in the Django patch.

More information can also be found here.

It works!

Sweet, happy coding!

blog comments powered by Disqus
  1. renooble posted this