15 lines
351 B
Python
15 lines
351 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'
|
||
|
]
|