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

Update filtersets.md

corrected typos on the page,
an issue report has also been submitted at https://github.com/netbox-community/netbox/issues/10179
regards,
This commit is contained in:
itok
2022-08-28 13:53:53 +03:00
committed by GitHub
parent 83db8d2072
commit 173f27cb64

View File

@ -34,12 +34,12 @@ To utilize a filter set in a subclass of one of NetBox's generic views (such as
```python
# views.py
from netbox.views.generic import ObjectListView
from .filtersets import MyModelFitlerSet
from .filtersets import MyModelFilterSet
from .models import MyModel
class MyModelListView(ObjectListView):
queryset = MyModel.objects.all()
filterset = MyModelFitlerSet
filterset = MyModelFilterSet
```
To enable a filter set on a REST API endpoint, set the `filterset_class` attribute on the API view: