質問編集履歴

2

記載漏れ

2021/03/26 10:15

投稿

te_ff
te_ff

スコア13

test CHANGED
File without changes
test CHANGED
@@ -35,6 +35,10 @@
35
35
  video_serializer.data['video'],
36
36
 
37
37
  )
38
+
39
+ video = Video.object.filter(pk=video_serializer.instance.pk)
40
+
41
+ serializers = VideoSerializer(video, many=True)
38
42
 
39
43
  // ここでvideo_serializerにthumb_pathを追加したい
40
44
 

1

記載項目が足りていなかったため追記

2021/03/26 10:15

投稿

te_ff
te_ff

スコア13

test CHANGED
File without changes
test CHANGED
@@ -64,9 +64,23 @@
64
64
 
65
65
  'id',
66
66
 
67
- 'videos',
67
+ 'video',
68
68
 
69
69
  'thumb_path'
70
+
71
+ ]
72
+
73
+
74
+
75
+ class VideoCreateSerializer(serializers.ModelSerializer):
76
+
77
+ class Meta:
78
+
79
+ model = Video
80
+
81
+ fields = [
82
+
83
+ 'video',
70
84
 
71
85
  ]
72
86