2023-02-24 00:13:44 +08:00
|
|
|
from rest_framework import serializers
|
|
|
|
from .models import Note
|
|
|
|
|
|
|
|
|
|
|
|
class NoteSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = Note
|
2023-02-25 16:48:43 +08:00
|
|
|
fields = ('id', 'title', 'content', 'date_created')
|