1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #927: Upgrade to django-filter 1.0

This commit is contained in:
Jeremy Stretch
2017-03-01 13:09:19 -05:00
parent 5ad3044314
commit 1adae67dd7
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'
)
#