Commit Graph

873 Commits

Author SHA1 Message Date
Ryan P Kilby 18040dff02 Add rest_framework.FilterSet 2016-09-03 22:16:21 -04:00
Ryan P Kilby 3bc42ac21f Refactor filter defaults and overrides
- Make FILTER_DEFAULTS a class attr. This will allow the DRF FilterSet
  to easily override the defaults, without relying on filter_overrides.
- Move filter_overrides to the meta options, provide deprecation notice.
2016-09-03 22:16:21 -04:00
Carlton Gibson d5d6500b04 Merge pull request #469 from blueyed/dynamic-filter-predicate-with-MultipleChoiceFilter
MultipleChoiceFilter: allow to override get_filter_predicate
2016-08-24 22:11:35 +02:00
Daniel Hahler 8a4837fa60 fixup! Add test_filtering_to_field_name 2016-08-24 22:00:54 +02:00
Carlton Gibson ff81c341d5 Merge pull request #475 from blueyed/tox-posargs
tox: commands: add {posargs}
2016-08-24 20:52:18 +02:00
Carlton Gibson d48aee29ff Merge pull request #474 from blueyed/fix-doc-typo
doc: fix typo with Filter.method
2016-08-24 16:03:28 +02:00
Daniel Hahler 3a94744667 tox: commands: add {posargs}
This makes `tox -e py35-django110 -- --help` etc work.
2016-08-24 15:42:36 +02:00
Daniel Hahler 8e217132ca doc: fix typo with Filter.method 2016-08-24 15:41:27 +02:00
Daniel Hahler 54f31d562f Add test_filtering_to_field_name 2016-08-24 15:35:46 +02:00
Daniel Hahler fb828f8d1b Add doc for new Model{Multiple,}ChoiceFilter 2016-08-24 14:20:59 +02:00
Daniel Hahler a93d5ad2b0 MultipleChoiceFilter: use to_field_name for lookups by default
Ref: https://github.com/carltongibson/django-filter/pull/469#issuecomment-241854666
2016-08-24 13:55:25 +02:00
Daniel Hahler 40711c5fd0 MultipleChoiceFilter: allow to override get_filter_predicate
This allows to use an annotated field easily, without overriding
`filter` altogether:

    class MyMultipleChoiceFilter(django_filters.ModelMultipleChoiceFilter):
        def get_filter_predicate(self, v):
            return {'annotated_field': v.annotated_field}

    foo = MyMultipleChoiceFilter(
        to_field_name='annotated_field',
        queryset=Model.objects.qs_with_annotated_field(),
    )
2016-08-24 13:55:25 +02:00
Carlton Gibson fe65bd511d Merge pull request #471 from carltongibson/remove-skipif-16
Remove lingering test version for Django <1.6
2016-08-23 22:34:04 +02:00
Carlton Gibson fb0ada62af Merge pull request #470 from blueyed/fix-docs
Minor doc fixes
2016-08-23 22:30:03 +02:00
Carlton Gibson 3ea3e4ce34 Merge pull request #459 from rpkilby/move-filter-options
Move filter options to Meta class
2016-08-23 22:29:49 +02:00
Carlton Gibson 303bb064cb Remove lingering test version for Django <1.6 2016-08-23 22:21:53 +02:00
Daniel Hahler f31e4c1465 Minor doc fixes 2016-08-23 22:15:05 +02:00
Carlton Gibson 2de872f476 Merge pull request #382 from rpkilby/deprecate-method-filter
Deprecate MethodFilter in favor of 'Filter.method'
2016-08-23 22:14:43 +02:00
Carlton Gibson c3e6f1c595 Merge branch 'rpkilby-deprecate-method-filter' into develop 2016-08-23 22:12:50 +02:00
Ryan P Kilby 0cbb38d2b4 whoops 2016-08-23 22:12:11 +02:00
Ryan P Kilby 16d07790c2 Add ref & migration docs, update guide 2016-08-23 22:12:11 +02:00
Ryan P Kilby 6b65e9692f Deprecate MethodFilter and Filter.action 2016-08-23 22:12:11 +02:00
Carlton Gibson 1e42ba0dc1 Merge pull request #468 from blueyed/use-kwargs.setdefault-in-multiplechoicefilter
Use kwargs.setdefault in MultipleChoiceFilter
2016-08-23 07:31:44 +02:00
Daniel Hahler ed6a22001a Use kwargs.setdefault in MultipleChoiceFilter
Ref: https://github.com/carltongibson/django-filter/pull/463#discussion_r75585072
2016-08-22 20:39:52 +02:00
Carlton Gibson b3ab92c928 Merge pull request #466 from blueyed/Cleanup-MultipleChoiceFilter.filter
Cleanup MultipleChoiceFilter.filter
2016-08-22 10:34:14 +02:00
Carlton Gibson f62ff13491 Merge pull request #463 from blueyed/Simplify-MultipleChoiceFilter.__init__
Simplify multiple choice filter.__init__
2016-08-22 10:31:08 +02:00
Carlton Gibson 477a02de4d Merge pull request #462 from blueyed/doc-fixes
Some doc fixes, mostly for MultipleChoiceFilter
2016-08-22 10:26:42 +02:00
Carlton Gibson 5b5be9f2b1 Merge pull request #465 from blueyed/flake8-fixes
Flake8 fixes
2016-08-22 10:25:38 +02:00
Daniel Hahler b28fdc1de7 Cleanup MultipleChoiceFilter.filter 2016-08-19 23:02:58 +02:00
Daniel Hahler f4e51fb013 flake8 fixes
Ignoring E501 (line too long), and docs/.
2016-08-19 22:42:11 +02:00
Daniel Hahler dc8266dad1 Simplify MultipleChoiceFilter.__init__ 2016-08-19 21:57:21 +02:00
Daniel Hahler d1e8737e02 Some doc fixes, mostly for MultipleChoiceFilter 2016-08-19 21:50:36 +02:00
Ryan P Kilby 78eef27a88 whoops 2016-08-14 21:49:10 -04:00
Ryan P Kilby 1d350f144f Add ref & migration docs, update guide 2016-08-14 21:10:02 -04:00
Ryan P Kilby 6a5610ad57 Deprecate MethodFilter and Filter.action 2016-08-14 21:08:42 -04:00
Ryan P Kilby c79dffb0a6 Add filter options migration docs 2016-08-14 20:18:43 -04:00
Ryan P Kilby d7ce397376 order_by_field => Meta.order_by_field 2016-08-14 20:16:43 -04:00
Ryan P Kilby 6413331d16 filter_overrides => Meta.filter_overrides 2016-08-14 19:24:48 -04:00
Ryan P Kilby 3eba34f508 strict => Meta.strict 2016-08-14 18:34:21 -04:00
Carlton Gibson 0b90d877ad Merge pull request #458 from carltongibson/develop
Version 0.14 Release
2016-08-14 21:15:11 +02:00
Carlton Gibson 69905eb869 Update CHANGES and version for 0.14 Release 2016-08-14 21:08:52 +02:00
Carlton Gibson 2715d6f315 Merge pull request #451 from rpkilby/warn-unrecognized-field
Resolve 450, add error message for unrecognized field types
2016-08-14 20:44:23 +02:00
Carlton Gibson 2f7fec71bf Merge pull request #452 from rpkilby/all-values-multiple
Add AllValuesMultiple Test
2016-08-14 20:38:40 +02:00
Carlton Gibson 49358c07ba Merge pull request #453 from edmorley/update-testing-matrix
Update Django and Python versions in testing matrix
2016-08-14 20:37:52 +02:00
Carlton Gibson 2c39201578 Merge pull request #455 from rpkilby/fix-empty-csv-value
Fix empty value for csv filter
2016-08-14 20:36:50 +02:00
Ryan P Kilby 9702e55744 Empty value for CSV should parse as [] 2016-08-10 17:14:57 -04:00
Ryan P Kilby 3ce6060eca Remove duplicate length checks 2016-08-10 17:02:22 -04:00
Ryan P Kilby 1aac7c96d8 Add deprecation docs, expand docs on Meta opts 2016-08-07 15:36:23 -04:00
Ryan P Kilby 86f87f887f Filter generation should assert recognizable field 2016-08-07 15:36:23 -04:00
Ryan P Kilby 69d90c0498 Resolve #450 2016-08-07 15:36:21 -04:00