Commit Graph

87 Commits

Author SHA1 Message Date
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
Carlton Gibson 15825aa65b Merge pull request #440 from rpkilby/revert-59
Revert #59, deprecate proxied queryset methods
2016-07-31 14:09:04 +02:00
Ryan P Kilby 784af5918a Add migration docs 2016-07-30 18:44:46 -04:00
Ryan P Kilby 3e760469a5 Add count method to qs deprecations 2016-07-30 16:57:50 -04:00
Ryan P Kilby 01eab0c920 Default ChoiceFilter to only exact lookups 2016-07-22 16:13:37 -04:00
Ryan P Kilby bb6f83fcbc Fix #439, Deprecate container-like methods 2016-06-30 01:21:39 -04:00
Ryan P Kilby 9d032f517d Add remote_queryset, fix #413 and fix #238 2016-05-06 21:27:14 -04:00
Ryan P Kilby aa73a270b2 Add filters_for_model as a class method 2016-04-29 20:01:53 -04:00
Ryan P Kilby dca832bedb Ignore parent_links in MTI setups 2016-03-25 16:21:35 -04:00
byrman 4943ed472d Add support for DurationField. 2016-03-14 20:45:16 +01:00
Daniel Hahler 69d63793a4 FilterSetMetaclass: add the not defined field name in TypeError 2016-02-24 20:53:18 +01:00
Ryan P Kilby 5f52896c1f Make 'isnull' conform to filter_overrides 2016-02-20 17:16:20 -05:00
Ryan P Kilby 2e8fe94e16 Merge branch 'develop' into lookup-filters
Conflicts:
	django_filters/filters.py
	docs/usage.txt
	tests/test_filters.py
	tests/test_filterset.py
2016-02-18 14:45:40 -05:00
Ryan P Kilby 634c652600 Add more thorough tests for CSV filters 2016-02-18 14:32:58 -05:00
Daniel Hahler a92bebc8b6 Do not apply default order_by with STRICTNESS.RAISE_VALIDATION_ERROR
Fixes https://github.com/alex/django-filter/issues/373.
2016-02-18 01:06:39 +01:00
Ryan P Kilby cd16637bf6 Add filters for specific lookup_types
- Includes 'isnull' handling
- Includes 'in' and 'range' handling that are dynamically created for
  its underlying field type.
2016-02-05 02:17:50 -05:00
Ryan P Kilby 5aee478f68 Deprecate lookup_type in favor of lookup_expr 2016-02-04 00:13:16 -05:00
Ryan P Kilby 2823345ff2 Add lookup expression transform handling 2016-02-03 22:54:52 -05:00
Ryan P Kilby 3e965a1031 Move get_model_field to utils, add documentation 2016-02-03 12:28:04 -05:00
Ryan P Kilby 90a9bb1700 Factor our field mro walking into utility method 2016-02-03 12:10:22 -05:00
Ryan P Kilby c3e6760a08 Fix django 2.0 compatibility warnings 2016-02-02 14:33:45 -05:00
Adam Dobrawy f4688feb7d PEP8 fix 2016-01-04 07:18:07 +01:00
Ryan P Kilby 3696ac6f8d Replace deprecated IPAddressField with GenericIPAddressField 2015-11-23 02:56:23 -05:00
Ryan P Kilby a942bf4377 Remove django<1.8 check 2015-11-23 02:53:38 -05:00
Ryan P Kilby f8bd87886d Remove more UUIDField checks 2015-11-23 02:53:31 -05:00
Ryan P Kilby fc2a4d6012 Remove python 2.6 deepcopy patch 2015-11-23 01:26:50 -05:00
Ryan P Kilby 4eff26e5c4 Fixes #290, handles deprecation notices 2015-11-23 00:19:25 -05:00
suqi 0577d002bb Add filter support for GenericIPAddressField(A new field type since django1.7) 2015-11-17 12:51:29 +08:00
Ryan P Kilby 3d4a4e6ae2 Cleanup imports, deprecations 2015-10-19 03:17:23 -04:00
Iurii Kriachko be036af804 use `count(*)` instead of `select * from table`; 2015-10-07 23:13:26 +03:00
gordon 3afb9c1675 set UUIDFilter for UUIDFields by default 2015-09-09 17:14:57 -04:00
Jocelyn Delalande 9f5283efff Consistency between filtering and ordering names
Precedence is given to the names declared as attributes on the FilterSet.
2015-09-02 18:46:22 +02:00
Matt d'Entremont 53c08f9a90 Add usage docs for new strictness option
- Also fix a typo
2015-06-23 14:33:22 -03:00
David Wolfe f671a77baa Add a third strict option which raises a validation error 2015-06-09 20:53:42 -03:00
Alexis Svinartchouk f462469c5a fix get_model_field when using django 1.8
In Django 1.8 ForeignObjectRel objects have no opts attribute.
Instead we should use rel.related_model._meta.
See
 * https://github.com/django/django/blob/1.8/django/db/models/fields/related.py#L1266
 * https://github.com/django/django/blob/1.7.7/django/db/models/related.py#L14
2015-04-03 20:06:31 +02:00
Diogo Machado 47b052ba12 fix adding error to form for older versions of django 2015-03-17 16:53:35 +00:00
Diogo Machado d3c80b9d34 group filter fields with meta option 'together' 2015-03-17 10:12:29 +00:00
Tomáš Ehrlich 32d1a3b6f7 Fixes #209, Fix replaced model in Django 1.8 2015-01-17 16:29:47 +01:00
Bahattin Cinic f52da8b8e4 i18n for OrderingField 2014-12-27 18:34:23 +02:00
Carlton Gibson bd3175677a Merge branch 'develop' of github.com:jaredlewis/django-filter into jaredlewis-develop 2014-09-25 15:16:27 +02:00
Brad Erickson cd18147066 Allow dictionaries to specify filterset field filters 2014-09-11 19:51:45 -07:00
Florian Apolloner 9491a50a1a Fixed warnings in the testsuite. 2014-07-27 12:27:06 +02:00
Jared 8a8cf527a1 Wrong copy import 2013-11-15 18:04:21 -05:00
Jared 809594ecb3 Fixes a bug with python 2.6 deepcoy, see http://bugs.python.org/issue1515 2013-11-15 18:01:13 -05:00
Jared 9078d4d85e Use six iteritems to be compatable with python3 2013-11-15 17:38:14 -05:00
Jared c7ee63e8fd When creating a new filter set iterate the filters and apply the parent attribute so the field has a reference to the viewset 2013-11-15 15:45:07 -05:00
Florian Apolloner 033a5230d1 Merge branch 'develop' into nicholasserra-bug/descending-order-by 2013-08-10 12:06:05 +02:00
Tim Heap 7d474fc25b Merge branch 'fix_ordering' into get_order_by
* fix_ordering:
  Fix regression in order_by
  explain the "strict" FilterSet option in the docs...created subsection to make it clearer it isn't a Meta option
  keep example FilterSet class name consistent
  fix a few tests due to defaulting strict = True
  - need to differentiate between actual 'None' value and a ValidationError - grab order_by value in for loop, avoids double lookup and eliminates need for get_value function
  change default value for strict to True, and hopefully made the code for filtering with invalid values clearer (also removed _SENTINEL)
  Fixed tests for Django 1.6/1.7.
  Disable python 2.6 on tests against Django master.
  Fixed support for newer wheel versions.
  change FilterSet to invoke form errors and skip filtering on invalid data, returning empty queryset with strict mode

Conflicts:
	django_filters/filterset.py
2013-08-10 13:55:43 +10:00
Tim Heap 1b6c89f970 Fix regression in order_by
Ordering was totally broken! The `ordering_field` was *not* in
`self.filters`, but `ordered_value` was only set while iterating over
`self.filters`. As such, `ordered_value` was always `None`. Because of
this, the default ordering was always used. The tests passed because
none of the tests checked to see if ordering on not the first field in
`Meta.order_by` worked.

The code has been fixed, and ordering is now possible again.

The tests have been fixed, and ordering by all fields in `Meta.order_by`
is now tested.
2013-08-10 13:47:36 +10:00