serializer.py 315 Bytes
from rest_framework import serializers


from .models import Edicto


class EdictoSerializer(serializers.ModelSerializer):
    cantidad_palabras = serializers.IntegerField(read_only=True)
    created = serializers.DateTimeField(read_only=True)

    class Meta:
        model = Edicto
        exclude = ('updated',)