Created
November 15, 2020 03:14
-
-
Save sankalpjonn/4d69bb0c0de94789842fe9eb23e8e882 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
from rest_framework import serializers | |
from .models import Note | |
class NoteSerializer(serializers.ModelSerializer): | |
is_active = serializers.BooleanField(read_only=True) | |
class Meta: | |
model = Note | |
fields = ('id', 'title', 'content', 'last_udpated_on', 'is_active') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment