devicehub-django/snapshot/serializers.py

9 lines
218 B
Python

from rest_framework import serializers
from snapshot.models import Snapshot
class SnapshotSerializer(serializers.ModelSerializer):
class Meta:
model = Snapshot
fields = ['id', 'title', 'content']