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

17 lines
353 B
Python
Raw Normal View History

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