Re: GeoDjango distance queryset filter with distance value stored within model

2012-03-04 Thread Jani Tiainen
I think you can only achieve that currently by using queryset extra() method. You should open a ticket and preferably create a standard geodjango testcase for that. It could be also possible that not all gis backends support that kind of a behavior. On Sat, Mar 3, 2012 at 6:47 PM, Daniel Gerzo w

GeoDjango distance queryset filter with distance value stored within model

2012-03-03 Thread Daniel Gerzo
Hello guys, I have an Order model, that has an origin PointField and a range IntegerField. Furthermore, there is an UserProfile model, which has a geo_location PointField. Now, I have an User instance, user. I want to select all Orders, whose distance between Order.origin and user.userprofile