RESTful API๐Ÿ’ก: ์žฅ๊ณ  DRF์™€ Serializer ๋ฟŒ์‹œ๊ธฐ

์ •์€๊ฒฝยท2020๋…„ 10์›” 29์ผ
0

๐ŸŽธ Play the Djangoย 

๋ชฉ๋ก ๋ณด๊ธฐ
41/57

RESTfulํ•œ API๋ฅผ ๋งŒ๋“ค์–ด ๋ณด์ž!

API ๋ฌธ์„œ๋ฅผ ์œ„ํ•œ Swagger๐Ÿ˜Ž

RESTful API๐Ÿ’ก: ๋‚˜์˜ swag๐Ÿ˜Ž swagger!

Django Serializer

  • ์ง๋ ฌํ™”(serialize)๋Š” ์ ํ•ฉํ•œ ๊ตฌ์กฐ๋กœ ์žฌ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ํฌ๋งท์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๊ณผ์ •์„ ์˜๋ฏธ

rest_framework.serializers

  • class BaseSerializer(Field)
  • class SerializerMetaclass(type)
  • def as_serializer_error(exc)
  • class Serializer(BaseSerializer, metaclass=SerializerMetaclass)
  • def raise_errors_on_nested_writes(method_name, serializer, vlidated_data)
  • class ModelSerializer(Serializer)
  • class HyperLinkedModelSerializer(ModelSerializer)

Reference

profile
#์˜์‹์˜ํ๋ฆ„ #์ˆœ๊ฐ„์ˆœ๊ฐ„ #์ƒ๊ฐ์˜์Šค๋ƒ…์ƒท

0๊ฐœ์˜ ๋Œ“๊ธ€