fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Login, registration etc.
[wolnelektury.git]
/
src
/
catalogue
/
api
/
serializers.py
diff --git
a/src/catalogue/api/serializers.py
b/src/catalogue/api/serializers.py
index
45252a8
..
06832e7
100644
(file)
--- a/
src/catalogue/api/serializers.py
+++ b/
src/catalogue/api/serializers.py
@@
-147,12
+147,13
@@
class CollectionListSerializer(serializers.ModelSerializer):
class CollectionSerializer(serializers.ModelSerializer):
class CollectionSerializer(serializers.ModelSerializer):
- books = BookSerializer(many=True, source='get_books')
+ books = BookSerializer(many=True, source='get_books', read_only=True)
+ book_slugs = serializers.CharField(write_only=True)
url = AbsoluteURLField()
class Meta:
model = Collection
url = AbsoluteURLField()
class Meta:
model = Collection
- fields = ['url', 'books', 'description', 'title']
+ fields = ['url', 'books', 'description', 'title'
, 'book_slugs'
]
class FragmentSerializer(serializers.ModelSerializer):
class FragmentSerializer(serializers.ModelSerializer):