example-of-crud-in-django-w.../app/libros/serializers.py
2021-07-13 18:18:18 +02:00

16 lines
324 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_at",
"updated_at",
)