Devid
Devid
The problem lies in the implementation of [`ManyrelatedField`](https://github.com/encode/django-rest-framework/blob/a8595a8eae2649b763f4882da643c1dc9183d6f1/rest_framework/relations.py#L521-L530) which is extremely simple and does not implement any kind of DB-level optimization. The same problem is in [`ListSerializer.create`](https://github.com/encode/django-rest-framework/blob/a8595a8eae2649b763f4882da643c1dc9183d6f1/rest_framework/serializers.py#L729-L732) method. To keep...
This may be handled like it is done in Django core [MultipleChoiceField](https://docs.djangoproject.com/en/5.1/ref/forms/fields/#multiplechoicefield): build a "bulk" select and than check if every provided key is in the returned queryset: https://github.com/django/django/blob/40d5516385448a73426aad396778f369a363eda9/django/forms/models.py#L1622-L1658 This...
Just a simple question about the tests: what it the advantage of altering the `sys.modules` property instead of having a file which contains such code? Django unittests for routing does...
What is the point of using a DRF serialier with a standard request? I mean: you should know when you are in an `APIView` (or `@api_view`) or not, if not...
In that case the "fix" is simple: ```python from rest_framwork.request import Request ... MySerializer(data, context={'request': Request(request)}) ``` Since you are using this outside rest framework "middleware" I belive it is...
To solve that the easiest fix would be to make flex-fields use `request.GET` instead of `request.query_params` ([which is just an alias property](https://www.django-rest-framework.org/api-guide/requests/#query_params)).
Currently the `partial` keyword argument provided to serializers is meant for ["partial update"](https://www.django-rest-framework.org/api-guide/serializers/#partial-updates), not for "partial representation". Thus the use-case you are willing is not that for which that parameter...
I suggest to look at #5888, because there there is a change which is the opposite of #9461 (the same change was made in #5639).
Currently I belive that this can be work-arounded by providing a callable default which raises a `SkipField` exception. ```python def skip_default(): raise serializers.SkipField class MySerializer(serializers.Serializer): name = serializers.CharField() type =...
Could you provide a full example, with also the view and some fields in the serializers? Or at least a minimal reproducible example. This is quite strange, because it seems...