Re: How to append extra data in LISTAPIVIEW in django

2021-03-04 Thread Mayuri Waghmare
ok thanks On Thu, Mar 4, 2021 at 6:58 PM Aman Kumar wrote: > One way is answer from this > https://stackoverflow.com/questions/24164160/adding-extra-data-to-django-rest-framework-results-for-entire-result-set > > If it was a simple APIView - You can pass extra context dictionary to your > seria

Re: How to append extra data in LISTAPIVIEW in django

2021-03-04 Thread Aman Kumar
One way is answer from this https://stackoverflow.com/questions/24164160/adding-extra-data-to-django-rest-framework-results-for-entire-result-set If it was a simple APIView - You can pass extra context dictionary to your serializer and then you can override the __init__ and/or to_representation

Re: How to append extra data in LISTAPIVIEW in django

2021-03-04 Thread Aman Kumar
Not sure about the ListAPIView, but in a simple APIView - You can pass extra context dictionary to your serializer and then you can override the __init__ and/or to_representation of your serializer and access the passed context there. for exa. in your view: serializer = MySerializer(queryset,

How to append extra data in LISTAPIVIEW in django

2021-03-04 Thread Mayuri Waghmare
please can anyone tell me without creating field how i can add key value in list api view in using model mixin -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an