Closes #927: Upgrade to django-filter 1.0

This commit is contained in:
Jeremy Stretch
2017-03-01 13:09:19 -05:00
parent 8b1b50da17
commit 9f216fd9ba
11 changed files with 225 additions and 158 deletions

View File

@@ -56,5 +56,8 @@ class TenantBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
class TenantFilterForm(BootstrapMixin, CustomFieldFilterForm):
model = Tenant
q = forms.CharField(required=False, label='Search')
group = FilterChoiceField(queryset=TenantGroup.objects.annotate(filter_count=Count('tenants')),
to_field_name='slug', null_option=(0, 'None'))
group = FilterChoiceField(
queryset=TenantGroup.objects.annotate(filter_count=Count('tenants')),
to_field_name='slug',
null_option=(0, 'None')
)