Sunday, May 30, 2021

Re: Filtering fields in http response data from http request url ?

Using Django Rest Framework , you can alter the output by overriting function to_represent in serializer.

On Mon, 31 May 2021, 1:26 am Adaeit Telle, <noboda9970@dashseat.com> wrote:
Hi Django Developers,
Json response from the django server is huge as the data fields contained are of big size.
So, can I restrict the *fields* required in the response data from the *HTTP Request Url* ?
Is there a generic param, which can be used ?

Just like QuerySet, can we have "ValueSet" to restrict the fields(or columns) in the json response data ?

Regards,
Adaeit

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f274b86b-e3fb-483b-802e-857362087619n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHV4E-dB0%3DHha6HgCoG4igdBbyyjPbQMO3rjkZBPaHH6_Kwscw%40mail.gmail.com.

No comments:

Post a Comment