Created
August 4, 2012 22:31
-
-
Save philipn/3260364 to your computer and use it in GitHub Desktop.
tastypie gis queryset methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the distance method takes a geom argument: | |
Map.objects.distance(geom).order_by('distance') --> | |
/api/map/?objects.distance=<geom>&order_by=distance | |
the area method takes no arguments: | |
Map.objects.area().order_by('area') --> | |
/api/map/?objects.area&order_by=area | |
nasty to allow a qs parameter w/o a value?h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment