JSON validation from DRF

2023-11-01 Thread : Anthony: Crawford.
Hi, I am trying to create an API that will provide JSON data that is based on Roku JSON specification (https://developer.roku.com/en-ca/docs/specs/direct-publisher-feed-specs/json-dp-spec.md). The specification requires that the JSON data is a single object { }, not a list array [ ]. So far I am

Re: JSON validation from DRF

2023-11-18 Thread : Anthony: Crawford.
, November 3, 2023 at 8:42:38 AM UTC-3 leonardo@franq.com.br wrote: > hi Anthony, as i know, the "many" parameter in your > RokuContentFeedSerializer method makes your data an array [ ]. > > Em qua., 1 de nov. de 2023 às 19:10, : Anthony: Crawford. < > crawfi...@

Re: JSON validation from DRF

2023-11-20 Thread : Anthony: Crawford.
erializerList(many=True) >playlists = PlaylistSerializerList(many=True) >class Meta: >model = RokuContentFeed >#read_only_fields = ['is_public'] >fields = ['providerName', 'language', 'rating', 'lastUpdated

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: 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://