# Django Rest Framework
from rest_framework import serializers

# Model
from api.models.sales import Sales
from api.serializers import ProductRegistroSerializer

class SalesSerializer(serializers.ModelSerializer):
    prod = ProductRegistroSerializer()
    class Meta:
        model  = Sales
        fields = '__all__'
        


class SalesRegistroSerializer(serializers.ModelSerializer):

    class Meta:
        model  = Sales
        fields = (
            'prod',
            'cant',
            'price_total',
        )
1a2c8a94dc13f5ac2cb946edb660e7c8a6d1cc2d
<mask token>

<mask token>


class SalesSerializer(serializers.ModelSerializer):
    <mask token>


    class Meta:
        model = Sales
        fields = '__all__'


class SalesRegistroSerializer(serializers.ModelSerializer):


    class Meta:
        model = Sales
        fields = 'prod', 'cant', 'price_total'

<mask token>


class SalesSerializer(serializers.ModelSerializer):
    prod = ProductRegistroSerializer()


    class Meta:
        model = Sales
        fields = '__all__'


class SalesRegistroSerializer(serializers.ModelSerializer):


    class Meta:
        model = Sales
        fields = 'prod', 'cant', 'price_total'

from rest_framework import serializers
from api.models.sales import Sales
from api.serializers import ProductRegistroSerializer


class SalesSerializer(serializers.ModelSerializer):
    prod = ProductRegistroSerializer()


    class Meta:
        model = Sales
        fields = '__all__'


class SalesRegistroSerializer(serializers.ModelSerializer):


    class Meta:
        model = Sales
        fields = 'prod', 'cant', 'price_total'

# Django Rest Framework
from rest_framework import serializers

# Model
from api.models.sales import Sales
from api.serializers import ProductRegistroSerializer

class SalesSerializer(serializers.ModelSerializer):
    prod = ProductRegistroSerializer()
    class Meta:
        model  = Sales
        fields = '__all__'
        


class SalesRegistroSerializer(serializers.ModelSerializer):

    class Meta:
        model  = Sales
        fields = (
            'prod',
            'cant',
            'price_total',
        )