Skip to content

Commit

Permalink
Merge pull request #93 from danousna/add_date_lookup
Browse files Browse the repository at this point in the history
Add the date lookup
  • Loading branch information
miki725 authored Feb 4, 2020
2 parents bea478f + af12ccd commit 9b3567a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/integrations/test_drf_coreapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ViewSet(ModelViewSet):
assert set(i.name for i in fields) == {
"place__address",
"place__address__contains",
"place__address__date",
"place__address__day",
"place__address__endswith",
"place__address__exact",
Expand All @@ -53,6 +54,7 @@ class ViewSet(ModelViewSet):
"place__id",
"place__name",
"place__name__contains",
"place__name__date",
"place__name__day",
"place__name__endswith",
"place__name__exact",
Expand All @@ -78,6 +80,7 @@ class ViewSet(ModelViewSet):
"place__name__year",
"serves_hot_dogs",
"serves_hot_dogs__contains",
"serves_hot_dogs__date",
"serves_hot_dogs__day",
"serves_hot_dogs__endswith",
"serves_hot_dogs__exact",
Expand All @@ -103,6 +106,7 @@ class ViewSet(ModelViewSet):
"serves_hot_dogs__year",
"serves_pizza",
"serves_pizza__contains",
"serves_pizza__date",
"serves_pizza__day",
"serves_pizza__endswith",
"serves_pizza__exact",
Expand All @@ -128,6 +132,7 @@ class ViewSet(ModelViewSet):
"serves_pizza__year",
"waiter__id",
"waiter__id__contains",
"waiter__id__date",
"waiter__id__day",
"waiter__id__endswith",
"waiter__id__exact",
Expand All @@ -153,6 +158,7 @@ class ViewSet(ModelViewSet):
"waiter__id__year",
"waiter__name",
"waiter__name__contains",
"waiter__name__date",
"waiter__name__day",
"waiter__name__endswith",
"waiter__name__exact",
Expand Down
1 change: 1 addition & 0 deletions url_filter/backends/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class DjangoFilterBackend(BaseFilterBackend):
name = "django"
supported_lookups = {
"contains",
"date",
"day",
"endswith",
"exact",
Expand Down

0 comments on commit 9b3567a

Please sign in to comment.