Switch out field_name= for name=

This appears to be a django-filter version change thing.
This commit is contained in:
Daniel Quinn 2018-09-02 21:26:30 +01:00
parent 2400245b96
commit f5e725c691

View File

@ -42,13 +42,16 @@ class DocumentFilterSet(FilterSet):
)
}
correspondent__name = CharFilter(name="correspondent__name", **CHAR_KWARGS)
correspondent__slug = CharFilter(name="correspondent__slug", **CHAR_KWARGS)
tags__name = CharFilter(name="tags__name", **CHAR_KWARGS)
tags__slug = CharFilter(name="tags__slug", **CHAR_KWARGS)
tags__empty = BooleanFilter(name='tags',
lookup_expr='isnull',
distinct=True)
correspondent__name = CharFilter(
field_name="correspondent__name", **CHAR_KWARGS)
correspondent__slug = CharFilter(
field_name="correspondent__slug", **CHAR_KWARGS)
tags__name = CharFilter(
field_name="tags__name", **CHAR_KWARGS)
tags__slug = CharFilter(
field_name="tags__slug", **CHAR_KWARGS)
tags__empty = BooleanFilter(
field_name="tags", lookup_expr="isnull", distinct=True)
class Meta:
model = Document