class ExplicitLookupsPersonDateFilter(FilterSet): date_joined = AllLookupsFilter(name='date_joined') time_joined = AllLookupsFilter(name='time_joined') datetime_joined = AllLookupsFilter(name='datetime_joined') class Meta: model = Person
class AllLookupsPersonDateFilter(FilterSet): date_joined = AllLookupsFilter(field_name='date_joined') time_joined = AllLookupsFilter(field_name='time_joined') datetime_joined = AllLookupsFilter(field_name='datetime_joined') class Meta: model = Person fields = []
class BFilter(FilterSet): name = AllLookupsFilter(field_name='name') c = RelatedFilter('CFilter', field_name='c', queryset=C.objects.all()) class Meta: model = B fields = []
class UserFilterWithAll(FilterSet): username = AllLookupsFilter(field_name='username') email = filters.CharFilter(field_name='email') class Meta: model = User fields = []
class PersonFilter(FilterSet): name = AllLookupsFilter(field_name='name') best_friend = RelatedFilter('tests.testapp.filters.PersonFilter', field_name='best_friend', queryset=Person.objects.all()) class Meta: model = Person fields = []
class PersonFilter(FilterSet): name = AllLookupsFilter(name='name') best_friend = RelatedFilter('tests.testapp.filters.PersonFilter', name='best_friend') class Meta: model = Person
class BFilter(FilterSet): name = AllLookupsFilter(name='name') c = RelatedFilter(CFilter, name='c') class Meta: model = B fields = []
class BlogFilter(FilterSet): name = AllLookupsFilter(field_name='name') post = RelatedFilter('PostFilter', field_name='post', queryset=Post.objects.all()) class Meta: model = Blog fields = []
class NoteFilter(FilterSet): title = AllLookupsFilter(field_name='title') author = RelatedFilter(UserFilter, field_name='author', queryset=User.objects.all()) class Meta: model = Note fields = []
class UserFilter(FilterSet): username = AllLookupsFilter(field_name='username') email = filters.CharFilter(field_name='email') last_login = filters.AllLookupsFilter() is_active = filters.BooleanFilter(field_name='is_active') class Meta: model = User fields = []
class TagFilter(FilterSet): name = AllLookupsFilter(field_name='name') class Meta: model = Tag fields = []
class InSetLookupPersonNameFilter(FilterSet): name = AllLookupsFilter('name') class Meta: model = Person fields = []
class InSetLookupPersonIDFilter(FilterSet): pk = AllLookupsFilter('id') class Meta: model = Person fields = []
class NoteFilterWithAll(FilterSet): title = AllLookupsFilter(field_name='title') class Meta: model = Note fields = []
class TagFilter(FilterSet): name = AllLookupsFilter(name='name') class Meta: model = Tag