Hi I am trying do use this approach https://medium.com/quant-five/speed-up-django-nested-foreign-key-serializers-w-prefetch-related-ae7981719d3f#04cf to handle nested relationship. We have a lot of those and I would like to automate the handling of these as much as possible.
The linked solution is okay, but involves calling that method in all views and that is just a lot of extra work. The serializer has access to all the information needed to perform this task I think, but I cannot get access to the queryset in order to actually make the changes. For context: I am building a custom serializer that inherits from ModelSerializer, that is to be used whenever this kind of behavior is required. Can someone point me to a place where I can intercept (and change) the queryset on the serializer instance? -- 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 email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/82538816-1454-479c-b944-6dbd82686295%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.