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

@@ -101,7 +101,10 @@ class SecretBulkEditForm(BootstrapMixin, BulkEditForm):
class SecretFilterForm(BootstrapMixin, forms.Form):
q = forms.CharField(required=False, label='Search')
role = FilterChoiceField(queryset=SecretRole.objects.annotate(filter_count=Count('secrets')), to_field_name='slug')
role = FilterChoiceField(
queryset=SecretRole.objects.annotate(filter_count=Count('secrets')),
to_field_name='slug'
)
#