mirror of
https://git.kotyczka.ch/developers/django.git
synced 2025-04-06 07:45:08 +02:00
13 lines
357 B
Python
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__' |