Re: custom field for geometry

2006-10-09 Thread Malcolm Tredinnick
On Mon, 2006-10-09 at 15:08 -0400, [EMAIL PROTECTED] wrote: > I'm playing with creating a custom django field to store a point. I'm > using PostGIS. > > The point is stored as a tuple, and in my field object I have > > def pre_save(self, model_instance, add): > value = getattr(model_in

custom field for geometry

2006-10-09 Thread bfordham
I'm playing with creating a custom django field to store a point. I'm using PostGIS. The point is stored as a tuple, and in my field object I have def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname) return r"GeomFromText('Point(%f, %f)', 830