django - Trying to filter by lt and gt -


I have a GPS point and I want to include objects that include that point

  latitude = request.POST ['latitude'] longitude = request.POST ['longitude'] For the # objects where the user gets coordinate, the minimum / maximum demarcation box filterargs = {'object_id' are: object_id, 'max_latitude__gt': Latitude, 'min_latitude__lt': Latitude, 'max_longitude__gt': Longitude, 'min_longitude__lt': longitude} objects = ObjectModel.objects.filter (** filterargs)  

This works if I do this:

  filterargs = {'object_id': object_id, 'max_latitude__gt': latitude}  

but all this I do not like the argument

I think Is that it seems to say:

The object that is the maximum latitude is higher than those latitude

have you copied the paste? Is that code? You have a typo (min_longitude__ls)

instead of using ls

Comments