Skip to content

Commit

Permalink
Renamed QUERY_PARAMS to query_params according to DRF 3
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Jul 17, 2015
1 parent d3e6847 commit 30fbf41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rest_framework_gis/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class InBBoxFilter(BaseFilterBackend):
bbox_param = 'in_bbox' # The URL query parameter which contains the bbox.

def get_filter_bbox(self, request):
bbox_string = request.QUERY_PARAMS.get(self.bbox_param, None)
bbox_string = request.query_params.get(self.bbox_param, None)
if not bbox_string:
return None

Expand Down Expand Up @@ -93,7 +93,7 @@ class TMSTileFilter(InBBoxFilter):
tile_param = 'tile' # The URL query paramater which contains the tile address

def get_filter_bbox(self, request):
tile_string = request.QUERY_PARAMS.get(self.tile_param, None)
tile_string = request.query_params.get(self.tile_param, None)
if not tile_string:
return None

Expand All @@ -111,7 +111,7 @@ class DistanceToPointFilter(BaseFilterBackend):
point_param = 'point' # The URL query parameter which contains the

def get_filter_point(self, request):
point_string = request.QUERY_PARAMS.get(self.point_param, None)
point_string = request.query_params.get(self.point_param, None)
if not point_string:
return None

Expand Down Expand Up @@ -164,7 +164,7 @@ def filter_queryset(self, request, queryset, view):
return queryset

# distance in meters
dist_string = request.QUERY_PARAMS.get(self.dist_param, 1000)
dist_string = request.query_params.get(self.dist_param, 1000)
try:
dist = float(dist_string)
except ValueError:
Expand Down

0 comments on commit 30fbf41

Please sign in to comment.