Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Fixed example use of deprecated function in GeoDjango tutorial.

Backport of r15358 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 86b0d5c1eb8162dca097555947d18664f4ae3ebc 1 parent a138e3b
@jbronn jbronn authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 docs/ref/contrib/gis/tutorial.txt
View
7 docs/ref/contrib/gis/tutorial.txt
@@ -630,14 +630,13 @@ in transformation SQL, allowing the developer to work at a higher level
of abstraction::
>>> qs = WorldBorders.objects.filter(mpoly__intersects=pnt)
- >>> qs.query.as_sql() # Generating the SQL
- ('SELECT "world_worldborders"."id", "world_worldborders"."name", "world_worldborders"."area",
+ >>> print qs.query # Generating the SQL
+ SELECT "world_worldborders"."id", "world_worldborders"."name", "world_worldborders"."area",
"world_worldborders"."pop2005", "world_worldborders"."fips", "world_worldborders"."iso2",
"world_worldborders"."iso3", "world_worldborders"."un", "world_worldborders"."region",
"world_worldborders"."subregion", "world_worldborders"."lon", "world_worldborders"."lat",
"world_worldborders"."mpoly" FROM "world_worldborders"
- WHERE ST_Intersects("world_worldborders"."mpoly", ST_Transform(%s, 4326))',
- (<django.contrib.gis.db.backend.postgis.adaptor.PostGISAdaptor object at 0x25641b0>,))
+ WHERE ST_Intersects("world_worldborders"."mpoly", ST_Transform(%s, 4326))
>>> qs # printing evaluates the queryset
[<WorldBorders: United States>]
Please sign in to comment.
Something went wrong with that request. Please try again.