<filename>categoria/serializers.py
from rest_framework import serializers

from categoria.models import Categoria


class CategoriaSerializer(serializers.ModelSerializer):

    class Meta:
        model = Categoria
        fields = '__all__'

<filename>categoria/serializers.py
from rest_framework import serializers

from categoria.models import Categoria


class CategoriaSerializer(serializers.ModelSerializer):

    class Meta:
        model = Categoria
        fields = '__all__'
