From f8deacacd3f702259d769ec37eccbf98a2606bb9 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 7 Jan 2017 13:00:00 -0600 Subject: [PATCH] =?UTF-8?q?Make=20sure=20fields=20can=E2=80=99t=20be=20upd?= =?UTF-8?q?ated=20in=20serializer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bikeshop_project/bike/serializers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bikeshop_project/bike/serializers.py b/bikeshop_project/bike/serializers.py index dc21666..398322f 100644 --- a/bikeshop_project/bike/serializers.py +++ b/bikeshop_project/bike/serializers.py @@ -7,3 +7,6 @@ class BikeSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Bike fields = '__all__' + + created_at = serializers.ReadOnlyField() + state = serializers.ReadOnlyField()