Re: Django_filters filter option not visible on browsable api

2023-11-20 Thread : Anthony: Crawford.
... and these imports in your views.py: from rest_framework import generics from rest_framework import filters from django_filters.rest_framework import DjangoFilterBackend On Wednesday, September 27, 2023 at 5:19:34 AM UTC-3 shekha...@gmail.com wrote: > Hi, > > I am following these > https://

Re: Django_filters filter option not visible on browsable api

2023-11-20 Thread : Anthony: Crawford.
I have not created a filterset before but I use this code in my API views, and I am always able to filter in browsable API. filter_backends = [DjangoFilterBackend] filterset_fields = ['x', 'y', 'z'] And in settings.py: REST_FRAMEWORK = { ... 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest

Re: JSON validation from DRF

2023-11-20 Thread : Anthony: Crawford.
Thank you for your help. This got me going. Cheers On Monday, November 20, 2023 at 4:22:36 AM UTC-4 m.gur...@gmail.com wrote: > As I see in your code, I think you misunderstood the RetrieveAPIView. You > cannot get a single object while giving multiple objects. If you create a > RetrieveAPIView

Re: JSON validation from DRF

2023-11-20 Thread Mehmet Gürol Çay
As I see in your code, I think you misunderstood the RetrieveAPIView. You cannot get a single object while giving multiple objects. If you create a RetrieveAPIView, you need to know which object is selected. I mean, you need to pass the ID of RokuContentFeed to your get method of RokuContentFee