Serializers¶
These are the DRF serializers used in Viewsets to serialize data from database to output format like XML or JSON.
Serializers are also able to deserialize content from XML or JSON inputs.
- class djangoapp_sample.serializers.article.ArticleSerializer(*args, **kwargs)[source]¶
Complete representation for detail and writing usage.
Blog relation have two serializer fields, one for read only to return resumed details and another one for write only with complete detail and which expect a blog ID.
- class djangoapp_sample.serializers.article.ArticleResumeSerializer(*args, **kwargs)[source]¶
Simpler Article representation for nested list. It won’t be suitable for writing usage.