blog

page 1 of 2 next page >

Immutable Django model fields

22 June 2008 django

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.

read full entry...

Django geography hacks

16 April 2008 django, geography, location — 4 comments

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.

read full entry...

Django request logging with rsyslog

27 March 2008 django, logging

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

read full entry...

Generic search engine pinging for Django

14 March 2008 django, seo

The Django contrib sitemap framework provides a way to let Google know when your sitemap has been updated. It's simple enough to add Ask and Yahoo; until I can get a patch contributed, this module is an easy way to ping them all.

read full entry...

Sitemap class for direct-to-template generic views

14 March 2008 django

A simple way to include direct-to-template pages in the sitemap of your Django site.

read full entry...

page 1 of 2 next page >