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
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
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,
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