def getquoted(self):
        # Want to use WKB, so wrap with psycopg2 Binary() to quote properly.
        return 'ST_GeomFromEWKB(E%s)' % Binary(self.ewkb)
Returns a properly quoted string for use in PostgreSQL/PostGIS.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/db/backends/postgis/adapter.py/PostGISAdapter.getquoted