Changes between Version 33 and Version 34 of GeoDjango
- Timestamp:
- Mar 11, 2007, 7:33:42 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GeoDjango
v33 v34 40 40 * Allow for Geometry-enabled queries. Status: complete (not yet in SVN). 41 41 * Here is an example of how the model API currently works (assume this example is in geo_app/models.py): 42 43 42 {{{ 44 43 from django.contrib.gis.db import models … … 59 58 60 59 * Use the manage.py just like you normally would: 61 62 60 {{{ 63 61 $ python manage.py sqlall geo_app … … 80 78 81 79 * PostGIS additions to the API may now be used: 82 83 80 {{{ 84 81 >>> from geo_app.models import District, School 85 82 >>> qs1 = District.objects.filter(poly__bbcontains='POINT(-95.362293 29.756539)') # Same as PostGIS '&&' operator 86 83 >>> qs2 = District.objects.filter(poly__intersects='POINT(-95.362293 29.756539)') # Same as PostGIS Intersects() (from GEOS) 87 88 84 }}} 89 85