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' ]