make 'exposition' field write_only to be able to add a book from scratch providing a idExpo on the server side
authorrougeronj
Thu, 11 Jun 2015 15:36:07 +0200
changeset 168 4b1294eaec0a
parent 167 389540e1073f
child 169 76fb2dd72ce4
make 'exposition' field write_only to be able to add a book from scratch providing a idExpo on the server side
server/ammicosrv/ammico/serializers/ammico.py
--- a/server/ammicosrv/ammico/serializers/ammico.py	Thu Jun 11 15:35:00 2015 +0200
+++ b/server/ammicosrv/ammico/serializers/ammico.py	Thu Jun 11 15:36:07 2015 +0200
@@ -13,7 +13,8 @@
     
     class Meta:
         model = Book
-        fields = ('id', 'user', 'id_article', 'parent_visit', 'title', 'description', 'image', 'date', 'count', 'public')
+        fields = ('id', 'user', 'id_article', 'parent_visit', 'title', 'description', 'image', 'date', 'count', 'public', 'exposition')
+        write_only_fields = ('exposition',)
         
 class SlideSerializer(TaggitSerializer, serializers.ModelSerializer):
     details = serializers.SerializerMethodField('getStopInfo')