django2/pyapp/pyapp_api/serializers.py
Peter Kotyczka 5fe40e0304 api added
2024-04-08 20:55:26 +02:00

13 lines
357 B
Python

from rest_framework import serializers
from pyapp.models import ShoppingItem
from pyapp.models import Product
class ShoppingItemSerializer(serializers.ModelSerializer):
class Meta:
model = ShoppingItem
fields = '__all__'
class ProductSerializer(serializers.ModelSerializer):
class Meta:
model = Product
fields = '__all__'