I started developing GeoDjango when PostGIS 1.2.1 was the latest. I
believe PostGIS began adding the ST_* routines in 1.2.1, and in 1.3.1
they deprecated any non-ST_* routines (e.g., in versions after 1.3.1
Transform(), GeomFromText(), etc. are completely replaced with their
ST_* counterparts).
I was aiming for compatibility with 1.1.0 and above, and the spatial
ORM automatically prefixes the lookup types with "ST_" if you're
running 1.2.1+. However, I see that I was mistaken in some of my
assumptions. Specifically, I thought that ST_GeomFromText and
ST_Transform were available in 1.1.0 -- which is apparently not the
case (I relied on comments in the SVN version that stated these
functions were introduced in 1.1.0). GeoDjango has hard-coded 'ST_'
references in the following locations:
http://code.djangoproject.com/browser/django/branches/gis/django/contrib/gis/db/backend/postgis/field.py#L107
http://code.djangoproject.com/browser/django/branches/gis/django/contrib/gis/geos/base.py#L204
If you change these lines to delete the 'ST_' prefix, then it should
work. I'll try and patch this issue -- thanks for posting!
-Justin
This issue inspired me to try upgrading my whole geo stack to PostGIS
1.3.1 and PG 8.2.4, which I have finally managed to do successfully.
Thanks for the patch, anyway, in case someone else comes down the same
path I did.
Matt