I don't the exact use case here, but you can pass context while passing
data to specializer.And then use it inside creializer clas by self.context.
In this case you can pass query params to context

On Wed, Feb 24, 2021, 10:15 [email protected] <[email protected]>
wrote:

> I have to filter my queryset based on a query param. I have to filter
> based on serializermethodfield.
> Any help would be appreciated.
>
>
> Thank you
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0a62f492-3a41-4692-9140-48dd23d7bdbbn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0a62f492-3a41-4692-9140-48dd23d7bdbbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOecAny7o-MrFSgaNR%2B2tKqshbxUMFtShxHw%3DiCk%2Betp-o8dZw%40mail.gmail.com.

Reply via email to