Open
Description
When debugging queries that use GeoDjango they are parsed like normal strings.
Example:
params = [u"ST_GeomFromEWKB('\\x0101000020e6100000555458045a9d16c010470d5cd47c4440'::bytea)"]
sql = 'SELECT (ST_distance_sphere("location"."point",%s)) AS "distance" FROM "location"'
What it should execute:
SELECT (ST_distance_sphere("location"."point", ST_GeomFromEWKB('\x0101000020e6100000555458045a9d16c010470d5cd47c4440'::bytea))) AS "distance" FROM "location"
What it really executes:
SELECT (ST_distance_sphere("location"."point", 'ST_GeomFromEWKB(''\x0101000020e6100000555458045a9d16c010470d5cd47c4440''::bytea)')) AS "distance" FROM "location"
I am using django-debug-toolbar version 0.9.4, Django 1.4 and PostgreSQL with PostGIS.