-
-
Save ewelina29/2d85154150efb213817472971689f233 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PizzaListSerializer(serializers.ModelSerializer): | |
sauce = serializers.CharField(source="sauce.name") | |
class Meta: | |
model = Pizza | |
fields = '__all__' | |
depth = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment