Skip to content

Instantly share code, notes, and snippets.

@paulonteri
Created April 22, 2020 14:43
Show Gist options
  • Save paulonteri/ba3261fca1dc7b9fa078386a0303c4a0 to your computer and use it in GitHub Desktop.
Save paulonteri/ba3261fca1dc7b9fa078386a0303c4a0 to your computer and use it in GitHub Desktop.
A simple Model Serializer
from rest_framework import serializers
from .models import Note
class NoteSerializer(serializers.ModelSerializer):
class Meta:
model = Note
fields = ['id', 'title', 'description', 'note']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment