Ticket #12111: django-contrib-gis-db-backend-postgis-adaptor.patch

File django-contrib-gis-db-backend-postgis-adaptor.patch, 610 bytes (added by mattrussell, 13 years ago)

Patch which gets rid of warnings from PostgreSQL/postgis for escaping geometries

  • adaptor.py

    old new  
    3030    def getquoted(self):
    3131        "Returns a properly quoted string for use in PostgreSQL/PostGIS."
    3232        # Want to use WKB, so wrap with psycopg2 Binary() to quote properly.
    33         return "%s(%s, %s)" % (GEOM_FROM_WKB, Binary(self.wkb), self.srid or -1)
     33        return "%s(E%s, %s)" % (GEOM_FROM_WKB, Binary(self.wkb), self.srid or -1)
    3535    def prepare_database_save(self, unused):
    3636        return self
Back to Top