diff options
| author | Tim Graham <timograham@gmail.com> | 2015-10-05 19:07:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-06 12:38:34 -0400 |
| commit | e0837f2cb12de5e95e621d19b186b0da43bcdee2 (patch) | |
| tree | ea6ae0b150304ed18d93fb8c3ee3b7defbda0e26 /docs/ref/contrib/gis/tutorial.txt | |
| parent | 3543fec3b739864c52de0a116dde3b0e5e885799 (diff) | |
Fixed #25508 -- Modified QuerySet.__repr__() to disambiguate it from a list.
Diffstat (limited to 'docs/ref/contrib/gis/tutorial.txt')
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index bf2bc28d9b..793e17a34e 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -588,9 +588,8 @@ Consortium (OGC). [#]_ Import the ``WorldBorder`` model, and perform a ``contains`` lookup using the ``pnt_wkt`` as the parameter:: >>> from world.models import WorldBorder - >>> qs = WorldBorder.objects.filter(mpoly__contains=pnt_wkt) - >>> qs - [<WorldBorder: United States>] + >>> WorldBorder.objects.filter(mpoly__contains=pnt_wkt) + <QuerySet [<WorldBorder: United States>]> Here, you retrieved a ``QuerySet`` with only one model: the border of the United States (exactly what you would expect). @@ -602,8 +601,7 @@ of a queryset:: >>> from django.contrib.gis.geos import Point >>> pnt = Point(12.4604, 43.9420) - >>> sm = WorldBorder.objects.get(mpoly__intersects=pnt) - >>> sm + >>> WorldBorder.objects.get(mpoly__intersects=pnt) <WorldBorder: San Marino> The ``contains`` and ``intersects`` lookups are just a subset of the @@ -638,7 +636,7 @@ of abstraction:: "world_worldborder"."mpoly" FROM "world_worldborder" WHERE ST_Intersects("world_worldborder"."mpoly", ST_Transform(%s, 4326)) >>> qs # printing evaluates the queryset - [<WorldBorder: United States>] + <QuerySet [<WorldBorder: United States>]> __ http://spatialreference.org/ref/epsg/32140/ |
