Original Post — Direct link

class RacuniizlaznifinancijskiSerializers(serializers.ModelSerializer):
    pp = PoslovnipartneriSerializers(many=True, read_only=True)
class Meta:
        model = Racuniizlaznifinancijski
        fields = ["__all__", "pp"]

I want all fields from Racuniizlaznifinancijski and also all fields from Poslovnipartneri...

What is wrong here?

External link →
over 4 years ago - /u/itmightbedave - Direct link

You just needs fields = ['__all__']. If you want all fields in the nested serializer, you need to set it on that object.