17 lines
353 B
Python
17 lines
353 B
Python
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",
|
|
]
|