Created
June 8, 2020 22:44
-
-
Save walison17/f1bd9b9da074e47b09322f2e3fc15c9a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ItemSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Item | |
fields = "__all__" | |
class CreatePointSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Point | |
fields = "__all__" | |
class ReadPointSerializer(CreatePointSerializer): | |
itens = ItemSerializer(many=True, source="item") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment