Systemy-rozmyte-sql/backend/cars/serializers.py

15 lines
351 B
Python
Raw Permalink Normal View History

2022-01-03 00:09:16 +01:00
from rest_framework import serializers
from .models import Car
class CarSerializer(serializers.ModelSerializer):
class Meta:
model = Car
fields = [
'mark',
'model',
'mileage',
'production_year',
'engine_capacity',
'combustion',
'price'
]