example-of-crud-in-django-w.../app/libros/serializers.py
2021-07-09 19:09:31 +02:00

16 lines
328 B
Python

# app/libros/serializers.py
from rest_framework import serializers
from .models import Libros
class LibroSerializer(serializers.ModelSerializer):
class Meta:
model = Libros
fields = "__all__"
read_only_fields = (
"id",
"created_date",
"updated_date",
)