- Notifications
You must be signed in to change notification settings - Fork302
-
Default ScenarioclassWebMapServiceSerializer(ModelSerializer):layers=HyperlinkedRelatedField(queryset=Layer.objects,many=True,# necessary for M2M fields & reverse FK fieldsrelated_link_view_name='registry:wms-layers-list',related_link_url_kwarg='parent_lookup_service',self_link_view_name='registry:wms-relationships', )included_serializers= {'layers':LayerSerializer, } If the request is without Include ScenarioIf the request is with So, IF and only IF the include for layers is needed i need to switch the field class for only this attribute to the ResourceRelatedField`to that the data is rendered. Is there any way to do that simple? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 0 comments
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment