/api/posts/5/ 에서 title, content, thumbnail 을 PUT 요청으로 update 해볼 것임.

 

postman 으로 PUT 요청을 보내면 위와 같은 에러가 뜬다.

 

AssertionError: The `.update()` method does not support writable dotted-source fields by default.
Write an explicit `.update()` method for serializer `apps.post.serializers.PostWriteSerializer`, or set `read_only=True` on dotted-source serializer fields.

읽기 전용 필드에서는 update() 메서드를 쓸 수 없다는 말 같다.

이거 때문에 create() 도 안됬었는데 해결 방법을 찾아보자.

+ Recent posts