-
-
Save ewelina29/3c415961609a79fa185577a14e3b4fd6 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 | |
class PizzaCreateSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Pizza | |
fields = '__all__' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment