def getquoted(self):
        "Returns a properly quoted string for use in PostgreSQL/PostGIS."
        # Want to use WKB, so wrap with psycopg2 Binary() to quote properly.
        return "%s(%s, %s)" % (GEOM_FROM_WKB, Binary(self.wkb), self.srid or -1)
dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/db/backend/postgis/adaptor.py/PostGISAdaptor.getquoted/original