network_inventory/computers/filters.py
2020-01-12 14:36:44 +01:00

10 lines
203 B
Python

from django_filters import FilterSet
from .models import Computer
class ComputerFilter(FilterSet):
class Meta:
model = Computer
fields = {"name": ["contains"], "owner": ["exact"]}