Articles tagged with django:

22
Jun
2008

django

Immutable Django model fields

I wanted to make a field on a Django model read-only after it was assigned an initial value. Maybe I was having a slow day, or my Google-fu was especially lacking, but I couldn't find a documented way to do this. There's the editable Field option, but I wanted to ensure I couldn't mistakenly overwrite the initial value anywhere — not just in the admin interface or form processing. It turned out to be pretty easy.

16
Apr
2008

django, geography, location

Django geography hacks

If you need to handle some basic geography in your Django application, but can't or don't want to use GeoDjango, here are some quick hacks to accomplish simple geocoding and distance calculations.

27
Mar
2008

django, logging

Django request logging with rsyslog

In my original post about logging Django requests, I had only tried my code with syslog-ng. It works fine with rsyslog too.