Skip to content

Commit c190cb7

Browse files
committed
Merge pull request #28 from maryokhin/patch-2
Remove deprecated request.QUERY_PARAMS
2 parents c6e242e + dca84c6 commit c190cb7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
``django-rest-framework-filters`` is an extension to Django REST Framework that makes working with filtering much easier. In addition to fixing some underlying warts and limitations of ``django-filter``, we allow arbitrary chaining of both relations and lookup filters.
1+
``django-rest-framework-filters`` is an extension to Django REST framework that makes working with filtering much easier. In addition to fixing some underlying warts and limitations of ``django-filter``, we allow arbitrary chaining of both relations and lookup filters.
22

33
E.g. using ``django-rest-framework-filters`` instead of just ``django-filter``, we can do stuff like::
44

@@ -21,7 +21,8 @@ Requirements
2121
------------
2222

2323
* Python 2.6+
24-
* Django 1.4.5+
24+
* Django 1.5.6+
25+
* Django REST framework 3.0+
2526

2627
Usage
2728
-----

rest_framework_filters/backends.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def filter_queryset(self, request, queryset, view):
4040
if filter_class:
4141
if filter_class in self._filter_instance_cache:
4242
_filter = self._filter_instance_cache[filter_class]
43-
self._setup_filter_instance(_filter, request.QUERY_PARAMS, queryset=queryset)
43+
self._setup_filter_instance(_filter, request.query_params, queryset=queryset)
4444
else:
45-
_filter = filter_class(request.QUERY_PARAMS, queryset=queryset)
45+
_filter = filter_class(request.query_params, queryset=queryset)
4646
self._filter_instance_cache[filter_class] = _filter
4747

4848
return _filter.qs

0 commit comments

Comments
 (0)