{"id":18711,"date":"2022-06-16T00:17:11","date_gmt":"2022-06-15T21:17:11","guid":{"rendered":"https:\/\/mob25.com\/?p=18711"},"modified":"2023-05-09T21:47:50","modified_gmt":"2023-05-09T18:47:50","slug":"serializatory-dlya-svyazannyh-modelej","status":"publish","type":"post","link":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/","title":{"rendered":"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\"><\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%94%D0%BE%D1%80%D0%B0%D0%B1%D0%B0%D1%82%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC_Kittygram\" >\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c Kittygram<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%9F%D1%80%D0%B8%D1%80%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%BE%D0%B2\" >\u041f\u0440\u0438\u0440\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u0438\u043a\u043e\u0432<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%9C%D0%B8%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D0%B8_%D1%81_%D0%BF%D1%80%D0%B8%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D1%8F%D0%BC%D0%B8\" >\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%A1%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D1%8B_%D0%B4%D0%BB%D1%8F_%D1%81%D0%B2%D1%8F%D0%B7%D0%B0%D0%BD%D0%BD%D1%8B%D1%85_%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B5%D0%B9\" >\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%A2%D0%B8%D0%BF_%D0%BF%D0%BE%D0%BB%D1%8F_StringRelatedField\" >\u0422\u0438\u043f \u043f\u043e\u043b\u044f StringRelatedField<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5_%D1%82%D0%B8%D0%BF%D1%8B_related-%D0%BF%D0%BE%D0%BB%D0%B5%D0%B9\" >\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b related-\u043f\u043e\u043b\u0435\u0439<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5_%D0%B4%D0%BE%D1%81%D1%82%D0%B8%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F\" >\u041d\u043e\u0432\u044b\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%92%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80\" >\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%9E%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8_%D0%B7%D0%B0%D0%BF%D0%B8%D1%81%D0%B8_%D1%81_%D0%B2%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BD%D1%8B%D0%BC%D0%B8_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D0%B0%D0%BC%D0%B8\" >\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#%D0%98%D1%81%D1%85%D0%BE%D0%B4%D0%BD%D1%8B%D0%B5_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5_%D0%B8%D0%B7_%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0_%D0%B2_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D0%B5\" >\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%94%D0%BE%D1%80%D0%B0%D0%B1%D0%B0%D1%82%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC_Kittygram\"><\/span>\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c Kittygram<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Kittygram \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c Cat; \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b.<\/p>\n\n\n\n<p>\u041d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u0432\u044c\u044e\u0441\u0435\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u0437\u0430\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0438\u043c \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u00bb.<\/p>\n\n\n\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436, \u043f\u043e\u043b\u0435\u0437\u043b\u0438. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9F%D1%80%D0%B8%D1%80%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%BE%D0%B2\"><\/span>\u041f\u0440\u0438\u0440\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u0438\u043a\u043e\u0432<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u041f\u043e\u0440\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u00ab\u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c\u00bb \u043f\u0440\u043e\u0435\u043a\u0442 Kittygram \u0432 \u0447\u0430\u0441\u0442\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438. \u041f\u0443\u0441\u0442\u044c \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 (<em>owner<\/em>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0435\u0442 \u0435\u0433\u043e \u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0438 \u0433\u043b\u0430\u0434\u0438\u0442\u044c.<\/p>\n\n\n\n<p>\u042d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430: \u0432\u043d\u043e\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Kittygram, \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0445\u043e\u0437\u044f\u0435\u0432\u0430\u0445-\u043a\u043e\u0442\u043e\u0432\u043e\u0434\u0430\u0445 (\u0438\u043c\u0435\u043d\u0438 \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>from django.db import models\n\n\nclass Owner(models.Model):\n    first_name = models.CharField(max_length=128)\n    last_name = models.CharField(max_length=128)\n\n    def __str__(self):\n        return f'{self.first_name} {self.last_name}'\n\n\nclass Cat(models.Model):\n    ... <\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c&nbsp;<strong>Cat<\/strong>&nbsp;\u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e&nbsp;<strong>Owner<\/strong>.<\/p>\n\n\n\n<p>\u0421\u0432\u044f\u0437\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u043e\u0434\u0438\u043d-\u043a-\u043e\u0434\u043d\u043e\u043c\u0443 (OneToOne);<\/li><li>\u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c (ForeignKey);<\/li><li>\u043c\u043d\u043e\u0433\u0438\u0435-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c (ManyToMany).<\/li><\/ul>\n\n\n\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u043e\u0432, \u043d\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446. \u0422\u0430\u043a\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c\u00bb.<\/p>\n\n\n\n<p>\u0421\u0432\u044f\u0436\u0438\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c&nbsp;<strong>Cat<\/strong>&nbsp;\u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>&nbsp;\u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Owner:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><em># cats\/models.py<\/em>\nfrom django.db import models\n\n\nclass Owner(models.Model):\n    first_name = models.CharField(max_length=128)\n    last_name = models.CharField(max_length=128)\n\n    def __str__(self):\n        return f'{self.first_name} {self.last_name}'\n\n\nclass Cat(models.Model):\n    name = models.CharField(max_length=16)\n    color = models.CharField(max_length=16)\n    birth_year = models.IntegerField()\n    <em># \u041d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438:<\/em>\n    owner = models.ForeignKey(\n        Owner, related_name='cats', on_delete=models.CASCADE)\n\n    def __str__(self):\n        return self.name <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9C%D0%B8%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D0%B8_%D1%81_%D0%BF%D1%80%D0%B8%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D1%8F%D0%BC%D0%B8\"><\/span>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:&nbsp;<code>python3 manage.py makemigrations<\/code>. \u041d\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>You are trying to add a non-nullable field 'owner' to cat without a default; we can't do that (the database needs something to populate existing rows).\nPlease select a fix:\n 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)\n 2) Quit, and let me add a default in models.py\nSelect an option: <\/code><\/pre>\n\n\n\n<p>\u0421\u0443\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u0430. \u041f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0411\u0414 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>; \u0435\u0441\u043b\u0438 \u0431\u044b \u0432 \u0431\u0430\u0437\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0438 \u0434\u043b\u044f \u043d\u0438\u0445. \u041f\u043e\u043b\u0435&nbsp;<code>owner<\/code>&nbsp;\u2014 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442, \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e. \u00ab\u0418 \u0447\u0435\u043c \u0436\u0435 \u043c\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>, \u0435\u0441\u043b\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0432\u0434\u0440\u0443\u0433 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438?\u00bb \u2014 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 Django.<\/p>\n\n\n\n<p>\u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 Django \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 Cat \u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u0437\u0430\u0434\u0430\u0451\u0442 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0435\u0441\u0442\u044c \u2014 \u0447\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n\n\n\n<p>\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0442\u0432\u0435\u0442\u0430: \u00ab\u0415\u0441\u043b\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 Cat \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u0437\u0430\u043f\u043e\u043b\u043d\u0438 \u0432 \u043d\u0438\u0445 \u043f\u043e\u043b\u0435 owner \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c!\u00bb \u041f\u0443\u0441\u0442\u044c \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,&nbsp;<code>1<\/code>.<\/p>\n\n\n\n<p>\u041d\u0430\u043c \u044d\u0442\u043e \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u0433\u0440\u043e\u0437\u0438\u0442: \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0441\u0442\u0430, \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c. \u0410 \u0432\u043e\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Select an option: 1\nPlease enter the default value now, as valid Python\nThe datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now\nType 'exit' to exit this prompt\n&gt;&gt;&gt; 1\nMigrations for 'cats':\n  cats\/migrations\/0002_auto_20210605_2128.py\n    - Create model Owner\n    - Add field owner to cat <\/code><\/pre>\n\n\n\n<p>\u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:&nbsp;<code>python3 manage.py migrate<\/code>.<\/p>\n\n\n\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443: \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440&nbsp;<code>OwnerSerializer<\/code>&nbsp;\u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Owner<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><em># cats\/serializers.py<\/em>\nfrom rest_framework import serializers\n\nfrom .models import Cat, Owner\n\n\nclass CatSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Cat\n        fields = ('id', 'name', 'color', 'birth_year')\n\n\nclass OwnerSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Owner\n        fields = ('first_name', 'last_name') <\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u044c\u044e\u0441\u0435\u0442&nbsp;<code>OwnerViewSet<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><em># cats\/views.py<\/em>\nfrom rest_framework import viewsets\n\nfrom .models import Cat, Owner\nfrom .serializers import CatSerializer, OwnerSerializer\n\n\nclass CatViewSet(viewsets.ModelViewSet):\n    queryset = Cat.objects.all()\n    serializer_class = CatSerializer\n\n\nclass OwnerViewSet(viewsets.ModelViewSet):\n    queryset = Owner.objects.all()\n    serializer_class = OwnerSerializer <\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0443\u0442\u0435\u0440 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><em># kittygram_plus\/urls.py<\/em>\nfrom rest_framework.routers import DefaultRouter\n\nfrom django.urls import include, path\n\nfrom cats.views import CatViewSet, OwnerViewSet\n\n\nrouter = DefaultRouter()\nrouter.register('cats', CatViewSet)\nrouter.register('owners', OwnerViewSet)\n\nurlpatterns = [\n    path('', include(router.urls)),\n] <\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438&nbsp;<code>python manage.py runserver<\/code>&nbsp;\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442&nbsp;<code>owners\/<\/code>&nbsp;\u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0445\u043e\u0437\u044f\u0438\u043d\u0430 \u043a\u043e\u0442\u0438\u043a\u043e\u0432 \u2014 \u043e\u043d \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n\n\n\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0443 \u043d\u0430\u0441 \u043c\u043e\u0433 \u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u041f\u0430\u0431\u043b\u043e \u041f\u0438\u043a\u0430\u0441\u0441\u043e, \u043e\u043d, \u0441\u0443\u0434\u044f \u043f\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u0430\u043c, \u0431\u044b\u043b \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u0434\u0443\u0448\u0435\u043d \u043a \u043a\u043e\u0442\u0438\u043a\u0430\u043c. \u0418 \u0412\u043e\u043b\u0430\u043d\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c: \u0443 \u043d\u0435\u0433\u043e \u0432 \u0443\u0441\u043b\u0443\u0436\u0435\u043d\u0438\u0438 \u0431\u044b\u043b \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u043a\u043e\u0442.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png\" alt=\"\" data-id=\"18712\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18712\" class=\"wp-image-18712\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%A1%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D1%8B_%D0%B4%D0%BB%D1%8F_%D1%81%D0%B2%D1%8F%D0%B7%D0%B0%D0%BD%D0%BD%D1%8B%D1%85_%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B5%D0%B9\"><\/span>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Owner<\/strong>&nbsp;\u043d\u0435\u0442 \u043f\u043e\u043b\u044f&nbsp;<code>cats<\/code>, \u043d\u043e \u044d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e&nbsp;<strong>Cat<\/strong>&nbsp;\u0447\u0435\u0440\u0435\u0437 related_name&nbsp;<code>'cats'<\/code>. \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c: \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f&nbsp;<code>cats<\/code>&nbsp;\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0432&nbsp;<code>OwnerSerializer<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class OwnerSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Owner\n        fields = ('first_name', 'last_name', 'cats') <\/code><\/pre>\n\n\n\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 Cat \u043f\u043e\u043b\u0435 Owner \u0432\u044b \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438, \u0435\u0433\u043e \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440&nbsp;<code>CatSerializer<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class CatSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Cat\n        fields = ('id', 'name', 'color', 'birth_year', 'owner') <\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c GET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 owners\/ \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0445\u043e\u0437\u044f\u0435\u0432 \u043a\u043e\u0442\u0438\u043a\u043e\u0432, \u0442\u043e \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 cats, \u043d\u043e \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442\u044b\u043c: \u0432 \u0431\u0430\u0437\u0435 \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser1.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser1-1024x675.png\" alt=\"\" data-id=\"18713\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser1.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18713\" class=\"wp-image-18713\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser1-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser1-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser1-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser1-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser1.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043d\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442&nbsp;<code>cats\/<\/code>&nbsp;\u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0442\u0438\u043a\u043e\u0432.<\/p>\n\n\n\n<p>\u0412 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u043e\u043b\u0435&nbsp;<em>owner<\/em>&nbsp;\u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 id \u0445\u043e\u0437\u044f\u0438\u043d\u0430: \u0435\u0441\u043b\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0445\u043e\u0437\u044f\u0438\u043d, \u0435\u0433\u043e id \u0440\u0430\u0432\u0435\u043d 1.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser2.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser2-1024x675.png\" alt=\"\" data-id=\"18714\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser2.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18714\" class=\"wp-image-18714\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser2-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser2-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser2-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser2-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser2.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f&nbsp;<code>PrimaryKeyRelatedField<\/code>; \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u043f\u043e\u043b\u044f \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 (id) \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0438\u043c\u0435\u043d\u043d\u043e id \u0445\u043e\u0437\u044f\u0438\u043d\u0430, \u0430 \u043d\u0435 \u0435\u0433\u043e&nbsp;<code>first_name<\/code>&nbsp;\u0438\u043b\u0438&nbsp;<code>last_name<\/code>. \u0410 \u043f\u0440\u0438 GET-\u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443&nbsp;<em>owners\/<\/em>&nbsp;\u0432 \u043f\u043e\u043b\u0435&nbsp;<code>cats<\/code>&nbsp;\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0437\u044f\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a id \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0438\u043c \u043a\u043e\u0442\u0438\u043a\u043e\u0432.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[\n    {\n        \"first_name\": \"Theodor\",\n        \"last_name\": \"Voland\",\n        \"cats\": [\n            1,\n            2\n        ]\n    }\n] <\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e: \u043f\u043e id \u043f\u0440\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0437\u043d\u0430\u0435\u0448\u044c. \u041d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e id \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435.\u0412 \u043a\u043b\u0430\u0441\u0441\u0435&nbsp;<strong>Cat<\/strong>&nbsp;\u043e\u043f\u0438\u0441\u0430\u043d \u043c\u0435\u0442\u043e\u0434&nbsp;<code>__str__<\/code>: \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Cat<\/strong>&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043b\u044f&nbsp;<code>name<\/code>. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e id \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u043e\u0441\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<p>\u041d\u0430\u043c \u043d\u0435 \u0442\u0440\u0443\u0434\u043d\u043e, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0438\u044f\u0442\u043d\u043e.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%A2%D0%B8%D0%BF_%D0%BF%D0%BE%D0%BB%D1%8F_StringRelatedField\"><\/span>\u0422\u0438\u043f \u043f\u043e\u043b\u044f StringRelatedField<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0412 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435&nbsp;<code>OwnerSerializer<\/code>&nbsp;\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0442\u0438\u043f \u043f\u043e\u043b\u044f&nbsp;<code>cats<\/code>&nbsp;\u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e&nbsp;<code>PrimaryKeyRelatedField<\/code>&nbsp;\u043d\u0430&nbsp;<code>StringRelatedField<\/code>.<\/p>\n\n\n\n<p>\u0420\u043e\u043b\u044c&nbsp;<code>StringRelatedField<\/code>&nbsp;\u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432\u043c\u0435\u0441\u0442\u043e id.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class OwnerSerializer(serializers.ModelSerializer):\n    cats = serializers.StringRelatedField(many=True, read_only=True)\n\n    class Meta:\n        model = Owner\n        fields = ('first_name', 'last_name', 'cats') <\/code><\/pre>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b&nbsp;<code>many=True<\/code>&nbsp;\u0438&nbsp;<code>read_only=True<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0414\u043b\u044f \u043f\u043e\u043b\u044f&nbsp;<code>cats<\/code>&nbsp;\u0432 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Owner<\/strong>&nbsp;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0441\u0432\u044f\u0437\u044c&nbsp;<strong>\u00ab\u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c\u00bb<\/strong>&nbsp;(\u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0445\u043e\u0437\u044f\u0438\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u043e\u0432), \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u043b\u044e&nbsp;<code>cats<\/code>&nbsp;\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0451\u043c \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442&nbsp;<code>many=True<\/code>.<\/li><li>\u041f\u043e\u043b\u044f \u0441 \u0442\u0438\u043f\u043e\u043c StringRelatedField \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0438\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>read_only=True<\/code>.<\/li><\/ul>\n\n\n\n<p>\u0421\u043d\u043e\u0432\u0430 \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443&nbsp;<em>owners\/<\/em>&nbsp;\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043e\u0442\u0432\u0435\u0442:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser3.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser3-1024x675.png\" alt=\"\" data-id=\"18715\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser3.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18715\" class=\"wp-image-18715\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser3-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser3-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser3-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser3-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser3.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043a\u043e\u0434 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430&nbsp;<code>CatSerializer<\/code>: \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>. \u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 cats\/ \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0435 id \u0445\u043e\u0437\u044f\u0438\u043d\u0430 \u043a\u043e\u0442\u0438\u043a\u0430, \u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 Owner; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>many=True<\/code>&nbsp;\u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0432\u0435\u0434\u044c \u0443 \u043a\u043e\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0445\u043e\u0437\u044f\u0438\u043d.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class CatSerializer(serializers.ModelSerializer):\n    owner = serializers.StringRelatedField(read_only=True)\n    \n    class Meta:\n        model = Cat\n        fields = ('id', 'name', 'color', 'birth_year', 'owner') <\/code><\/pre>\n\n\n\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 cats\/. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043a\u043e\u0442\u0438\u043a\u0430 \u0432 \u043f\u043e\u043b\u0435&nbsp;<code>owner<\/code>&nbsp;\u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f&nbsp;<strong>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong>&nbsp;\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043a\u043e\u0442\u0438\u043a\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430&nbsp;<strong>Owner<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser4.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser4-1024x675.png\" alt=\"\" data-id=\"18716\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser4.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18716\" class=\"wp-image-18716\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser4-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser4-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser4-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser4-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser4.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f StringRelatedField \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0440\u0430\u0437\u044f\u0442\u0441\u044f \u0438 \u043d\u0430 \u043e\u0442\u0432\u0435\u0442\u0430\u0445 API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5_%D1%82%D0%B8%D0%BF%D1%8B_related-%D0%BF%D0%BE%D0%BB%D0%B5%D0%B9\"><\/span>\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b related-\u043f\u043e\u043b\u0435\u0439<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u041f\u043e\u043c\u0438\u043c\u043e&nbsp;<code>PrimaryKeyRelatedField<\/code>&nbsp;\u0438&nbsp;<code>StringRelatedField<\/code>&nbsp;\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.  \u0412\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u043d\u0430\u0439\u0442\u0438&nbsp;<a href=\"https:\/\/www.django-rest-framework.org\/api-guide\/relations\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5_%D0%B4%D0%BE%D1%81%D1%82%D0%B8%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F\"><\/span>\u041d\u043e\u0432\u044b\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u041a\u043e\u0442 \u043d\u0435 \u043a\u043e\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0442\u0432\u043e\u0440\u0438\u043b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430 \u0434\u0435\u043d\u044c. \u041f\u0440\u043e\u043a\u0430\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442: \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u0442\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439.<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c&nbsp;<strong>Achievement<\/strong>&nbsp;(\u0430\u043d\u0433\u043b. \u00ab\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435\u00bb). \u0412 \u043d\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0432\u0438\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a \u043b\u044e\u0431\u044f\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u043a\u043e\u0448\u0430\u0447\u044c\u0438\u0445: \u00ab\u0443\u0440\u043e\u043d\u0438\u043b \u0451\u043b\u043a\u0443\u00bb, \u00ab\u043f\u0440\u043e\u0433\u0440\u044b\u0437 \u043f\u0440\u043e\u0432\u043e\u0434\u00bb, \u00ab\u0440\u0430\u0437\u0431\u0438\u043b \u0441\u0442\u0430\u043a\u0430\u043d\u00bb, \u00ab\u043d\u0430\u043f\u0430\u043b \u0438\u0437-\u0437\u0430 \u0443\u0433\u043b\u0430\u00bb.<\/p>\n\n\n\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u044c&nbsp;<strong>Cat<\/strong>&nbsp;\u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u2014&nbsp;<code>achievements<\/code>&nbsp;(\u0430\u043d\u0433\u043b. \u00ab\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u00bb), \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Achievement \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c AchievementCat \u2014 \u0435\u0451 \u0442\u043e\u0436\u0435 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>from django.db import models\n\n\nclass Achievement(models.Model):\n    name = models.CharField(max_length=64)\n\n    def __str__(self):\n        return self.name\n\n\nclass Owner(models.Model):\n    first_name = models.CharField(max_length=128)\n    last_name = models.CharField(max_length=128)\n\n    def __str__(self):\n        return f'{self.first_name} {self.last_name}'\n\n\nclass Cat(models.Model):\n    name = models.CharField(max_length=16)\n    color = models.CharField(max_length=16)\n    birth_year = models.IntegerField()\n    owner = models.ForeignKey(\n        Owner, related_name='cats', on_delete=models.CASCADE)\n    <em># \u0421\u0432\u044f\u0437\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c AchievementCat<\/em>\n    achievements = models.ManyToManyField(Achievement, through='AchievementCat')\n\n    def __str__(self):\n        return self.name\n\n<em># \u0412 \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u044b id \u043a\u043e\u0442\u0438\u043a\u0430 \u0438 id \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f<\/em>\nclass AchievementCat(models.Model):\n    achievement = models.ForeignKey(Achievement, on_delete=models.CASCADE)\n    cat = models.ForeignKey(Cat, on_delete=models.CASCADE)\n\n    def __str__(self):\n        return f'{self.achievement} {self.cat}' <\/code><\/pre>\n\n\n\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043a\u043e\u0442\u0438\u043a\u043e\u0432, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u0442\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439; \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u044c&nbsp;<strong>\u00ab\u043c\u043d\u043e\u0433\u0438\u0435-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c\u00bb<\/strong>.<\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%92%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80\"><\/span>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 Cat \u0438 Owner \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043b\u0438\u0448\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 (\u044d\u0442\u043e \u0431\u044b\u043b \u0435\u0433\u043e id \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e, \u0437\u0430\u043c\u0435\u0449\u0430\u044e\u0449\u0435\u0435 id), \u043d\u043e \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a \u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0442\u0438\u043a\u0430 \u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u0442\u0438\u043a\u043e\u043c&nbsp;<strong>\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong>&nbsp;\u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Achievement<\/strong>. \u041d\u0430\u0434\u043e \u0438\u0445 \u043a\u0430\u043a-\u0442\u043e \u0434\u043e\u0431\u044b\u0442\u044c.<\/p>\n\n\n\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443&nbsp;<em>cats\/<\/em>&nbsp;\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u043a\u043e\u0442\u0438\u043a\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c&nbsp;<strong>\u0441\u043f\u0438\u0441\u043e\u043a<\/strong>, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a \u044d\u0442\u043e\u043c\u0443 \u0437\u0432\u0435\u0440\u044e&nbsp;<strong>\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong>.<\/p>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u0434\u0435\u044e \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435, \u043d\u0443\u0436\u043d\u043e \u0432\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043f\u043e\u043b\u0435, \u0442\u0438\u043f\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0432 \u043f\u043e\u043b\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n\n\n\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442&nbsp;<code>CatSerializer<\/code>, \u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u2014&nbsp;<code>AchievementSerializer<\/code>&nbsp;(\u043d\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u0435\u0433\u043e \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c).<\/p>\n\n\n\n<p>\u0420\u0430\u0437\u043e\u043c\u043d\u0438\u0442\u0435 \u043f\u0430\u043b\u044c\u0446\u044b: \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Achievement<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class AchievementSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Achievement\n        fields = ('id', 'name') <\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c&nbsp;<code>CatSerializer<\/code>: \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0432 \u043d\u0451\u043c \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>. \u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d \u0442\u0438\u043f&nbsp;<code>PrimaryKeyRelatedField<\/code>. \u041d\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u043b\u0430\u043d\u0430\u0445 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435 id \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432&nbsp;<strong>Achievement<\/strong>, \u0430 \u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n\n\n\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u0442\u0438\u043f\u043e\u043c \u043f\u043e\u043b\u044f <code>achievements<\/code> \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <code>AchievementSerializer<\/code>. \u0414\u0430, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class AchievementSerializer(serializers.ModelSerializer):\n\n    class Meta:\n        model = Achievement\n        fields = ('id', 'name')\n\n\nclass CatSerializer(serializers.ModelSerializer):\n    owner = serializers.StringRelatedField(read_only=True)\n    <em># \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0435 achievements<\/em>\n    achievements = AchievementSerializer(read_only=True, many=True)\n\n    class Meta:\n        model = Cat\n        fields = ('id', 'name', 'color', 'birth_year', 'owner', 'achievements') <\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u0432 CatSerializer \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b Achievement, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 AchievementSerializer.<\/p>\n\n\n\n<p>\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e, \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u043e\u043b\u044e achievements \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 many=True. \u0418 \u043f\u043e\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044e \u2014 \u00ab\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\u00bb, \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u043f\u043e\u0437\u0436\u0435.<\/p>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u0442\u0438\u043a\u0443:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser5.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser5-1024x675.png\" alt=\"\" data-id=\"18717\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser5.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18717\" class=\"wp-image-18717\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser5-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser5-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser5-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser5-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser5.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Achievements<\/strong>, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u0442\u0438\u043a\u0443. \u042d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0443\u0441\u0442. \u041f\u043e\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u043a\u043e\u0442\u0438\u043a\u043e\u0432 \u0441 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%9E%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8_%D0%B7%D0%B0%D0%BF%D0%B8%D1%81%D0%B8_%D1%81_%D0%B2%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BD%D1%8B%D0%BC%D0%B8_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D0%B0%D0%BC%D0%B8\"><\/span>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u044f&nbsp;<code>owner<\/code>&nbsp;\u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Cat<\/strong>&nbsp;\u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u043d \u0442\u0438\u043f StringRelatedField; \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043d\u0435\u0433\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u041d\u043e \u0432 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0443, \u0433\u0434\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f: \u044d\u0442\u043e \u0432\u0435\u0440\u043d\u0451\u0442 \u043f\u043e\u043b\u044e \u0435\u0433\u043e \u0442\u0438\u043f \u00ab\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00bb.<\/p>\n\n\n\n<p>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044f&nbsp;<code>achievements<\/code>&nbsp;\u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>read_only=True<\/code>&nbsp;\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043d\u043e\u0432\u043e\u043c \u043a\u043e\u0442\u0438\u043a\u0435 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser6.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser6-1024x675.png\" alt=\"\" data-id=\"18718\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser6.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18718\" class=\"wp-image-18718\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser6-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser6-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser6-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser6-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser6.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0412 \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043b\u0438\u0431\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044f&nbsp;<code>achievements<\/code>&nbsp;\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442&nbsp;<code>read_only=True<\/code>, \u043b\u0438\u0431\u043e \u044f\u0432\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u043a\u0430\u043a \u0438 \u043a\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u2014 \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043a\u043e\u0442\u0438\u043a\u0430 \u0441 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435\u043c. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>read_only=True<\/code>&nbsp;\u2014 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0432 \u0411\u0414. \u0417\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0434\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>{\n    \"name\": \"\u0411\u0430\u0440\u0441\u0438\u043a\",\n    \"color\": \"White\",\n    \"birth_year\": 2017,\n    \"owner\": 1,\n    \"achievements\": [\n        {\"name\": \"\u043f\u043e\u0439\u043c\u0430\u043b \u043c\u044b\u0448\u043a\u0443\"},\n        {\"name\": \"\u0440\u0430\u0437\u0431\u0438\u043b \u0432\u0430\u0437\u0443\"}\n    ]\n} <\/code><\/pre>\n\n\n\n<p>\u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430&nbsp;<code>serializer.validated_data<\/code>&nbsp;\u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442&nbsp;<code>achievements<\/code>: \u0432 \u043d\u0451\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0442\u0438\u043a\u0430;<\/li><li>\u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043e \u043d\u043e\u0432\u043e\u043c \u043a\u043e\u0442\u0438\u043a\u0435 \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f; \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u0438\u043a\u0430 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u2014 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0436\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438;<\/li><li>\u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0442\u0438\u043a\u0430 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438:<ul><li>\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u2014 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u0432\u044f\u0437\u0435\u0439&nbsp;<strong>AchievementCat<\/strong>&nbsp;\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043e\u0442\u0438\u043a\u043e\u043c;<\/li><li>\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0431\u0430\u0437\u0435 \u043d\u0435\u0442 \u2014 \u0432 \u0431\u0430\u0437\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u0432\u044f\u0437\u0435\u0439 <strong>AchievementCat<\/strong> \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043e\u0442\u0438\u043a\u043e\u043c.<\/li><\/ul><\/li><li>\u0432\u0435\u0440\u043d\u0443\u0442\u044c JSON \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441\u0432\u0435\u0436\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439.<\/li><\/ul>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>create()<\/code>&nbsp;\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435. \u041e\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0438 \u0443\u043a\u0430\u0436\u0435\u043c \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043a\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>from .models import Cat, Owner, Achievement, AchievementCat\n\n...\n\nclass CatSerializer(serializers.ModelSerializer):\n    achievements = AchievementSerializer(many=True)  <em># \u0423\u0431\u0440\u0430\u043b\u0438 read_only=True<\/em>\n    <em># \u0423\u0431\u0440\u0430\u043b\u0438 owner = serializers.StringRelatedField(read_only=True)<\/em>\n    \n    class Meta:\n        model = Cat\n        fields = ('id', 'name', 'color', 'birth_year', 'owner', 'achievements')\n    \n    ...\n\n    def create(self, validated_data):\n        <em># \u0423\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f validated_data \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0435\u0433\u043e<\/em>\n        achievements = validated_data.pop('achievements')\n\n        <em># \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0442\u0438\u043a\u0430 \u043f\u043e\u043a\u0430 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439, \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e<\/em>\n        cat = Cat.objects.create(**validated_data)\n\n        <em># \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439<\/em>\n        for achievement in achievements:\n            <em># \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438\u0437 \u0411\u0414<\/em>\n            current_achievement, status = Achievement.objects.get_or_create(\n                **achievement)\n            <em># \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/em>\n            <em># \u041d\u0435 \u0437\u0430\u0431\u044b\u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043a\u043e\u0442\u0438\u043a\u0443 \u043e\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f<\/em>\n            AchievementCat.objects.create(\n                achievement=current_achievement, cat=cat)\n        return cat <\/code><\/pre>\n\n\n\n<p>\u0421\u043d\u043e\u0432\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-8 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser7.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser7-1024x675.png\" alt=\"\" data-id=\"18719\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser7.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18719\" class=\"wp-image-18719\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser7-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser7-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser7-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser7-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser7.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u043e \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u2014 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u0443\u0447\u0435\u043d \u0438 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c\u0438 \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u043e\u043b\u0435 \u0441\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c, \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b&nbsp;<code>create()<\/code>&nbsp;\u0438\u043b\u0438&nbsp;<code>update()<\/code>&nbsp;(\u0438\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0430) \u0438 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%D0%98%D1%81%D1%85%D0%BE%D0%B4%D0%BD%D1%8B%D0%B5_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5_%D0%B8%D0%B7_%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0_%D0%B2_%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%82%D0%BE%D1%80%D0%B5\"><\/span>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0431\u044b\u043b\u043e \u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435&nbsp;<code>serializer.initial_data<\/code>, \u0438 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043d\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f.<\/p>\n\n\n\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u0438\u043a\u0430, \u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-9 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser8.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser8-1024x675.png\" alt=\"\" data-id=\"18720\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser8.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18720\" class=\"wp-image-18720\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser8-1024x675.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser8-300x198.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser8-768x506.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser8-1536x1013.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser8.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"675\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u0412\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430: \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0438\u043d\u043e\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <strong>\u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/strong>, \u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435, \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n\n\n\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438&nbsp;<strong>Cat<\/strong>&nbsp;\u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u2014 \u0438 \u043a \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e&nbsp;<code>achievements<\/code>&nbsp;\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442&nbsp;<code>required=True<\/code>.<\/p>\n\n\n\n<p>\u041d\u043e \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c: \u0431\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u0442\u0438\u043a\u0438 \u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439, \u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u0442\u0438\u043a\u043e\u0432 \u0432 Kittigram. \u041c\u043e\u0434\u0435\u043b\u044c&nbsp;<strong>Cat<\/strong>&nbsp;\u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043d\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0434\u0430\u0451\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u043a\u0430\u043a \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435.<\/p>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044f&nbsp;<code>achievements<\/code>&nbsp;\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442&nbsp;<code>required<\/code>&nbsp;\u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c&nbsp;<code>False<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>class CatSerializer(serializers.ModelSerializer):\n    achievements = AchievementSerializer(many=True, required=False)\n    ... <\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043d\u0435\u0442 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0434\u0440\u0443\u0433\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-10 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser9.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"682\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser9-1024x682.png\" alt=\"\" data-id=\"18721\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser9.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18721\" class=\"wp-image-18721\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser9-1024x682.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser9-300x200.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser9-768x512.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser9-1536x1024.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser9.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"682\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434&nbsp;<code>create()<\/code>&nbsp;\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043f\u043e\u043b\u044f&nbsp;<code>achievements<\/code>, \u043d\u043e \u043f\u043e\u043b\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u2014 \u0438 \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c.<\/p>\n\n\n\n<p>\u0422\u0443\u0442 \u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c&nbsp;<code>initial_data<\/code>: \u0432 \u043c\u0435\u0442\u043e\u0434\u0435&nbsp;<code>create()<\/code>&nbsp;\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043f\u0440\u0438\u0448\u043b\u043e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043f\u043e\u043b\u0435&nbsp;<code>achievements<\/code>&nbsp;\u0438\u043b\u0438 \u043d\u0435\u0442, \u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043a\u043e\u0442\u0438\u043a\u0430 \u0441 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0438\u0445.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\n\n    def create(self, validated_data):\n        <em># \u0415\u0441\u043b\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u044f achievements<\/em>\n        if 'achievements' not in self.initial_data:\n            <em># \u0422\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u043e \u043a\u043e\u0442\u0438\u043a\u0435 \u0431\u0435\u0437 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439<\/em>\n            cat = Cat.objects.create(**validated_data)\n            return cat\n        else:\n            achievements = validated_data.pop('achievements')\n            <em># \u0418\u043d\u0430\u0447\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0442\u0438\u043a\u0430 \u0432 \u0411\u0414<\/em>\n            cat = Cat.objects.create(**validated_data)\n            <em># \u0410 \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0432 \u0411\u0414<\/em>\n            for achievement in achievements:\n                current_achievement, status = Achievement.objects.get_or_create(\n                    **achievement)\n                <em># \u0418 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0442\u0438\u043a\u043e\u043c<\/em>\n                AchievementCat.objects.create(\n                    achievement=current_achievement, cat=cat)\n            return cat <\/code><\/pre>\n\n\n\n<p>\u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-11 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser10.png\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"682\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser10-1024x682.png\" alt=\"\" data-id=\"18722\" data-full-url=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser10.png\" data-link=\"https:\/\/mob25.com\/?attachment_id=18722\" class=\"wp-image-18722\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser10-1024x682.png 1024w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser10-300x200.png 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser10-768x512.png 768w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser10-1536x1024.png 1536w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2021\/09\/ser10.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><meta itemprop=\"width\" content=\"1024\"><meta itemprop=\"height\" content=\"682\"><\/span><\/a><\/figure><\/li><\/ul><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c Kittygram \u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Kittygram \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c Cat; \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b. \u041d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u0432\u044c\u044e\u0441\u0435\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u0437\u0430\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0438\u043c \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u00bb. \u041d\u0443 \u0447\u0442\u043e \u0436, \u043f\u043e\u043b\u0435\u0437\u043b\u0438. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[187],"tags":[],"class_list":["post-18711","post","type-post","status-publish","format-standard","","category-uroki"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\" \/>\n<meta property=\"og:description\" content=\"\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c Kittygram \u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Kittygram \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c Cat; \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b. \u041d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u0432\u044c\u044e\u0441\u0435\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u0437\u0430\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0438\u043c \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u00bb. \u041d\u0443 \u0447\u0442\u043e \u0436, \u043f\u043e\u043b\u0435\u0437\u043b\u0438. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-15T21:17:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-09T18:47:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png\" \/>\n<meta name=\"author\" content=\"violet\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/\",\"url\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/\",\"name\":\"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\",\"isPartOf\":{\"@id\":\"https:\/\/mob25.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png\",\"datePublished\":\"2022-06-15T21:17:11+00:00\",\"dateModified\":\"2023-05-09T18:47:50+00:00\",\"author\":{\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/493391ea0717532d228de3cda6d7cf45\"},\"breadcrumb\":{\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage\",\"url\":\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png\",\"contentUrl\":\"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/mob25.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mob25.com\/blog\/#website\",\"url\":\"https:\/\/mob25.com\/blog\/\",\"name\":\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mob25.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/493391ea0717532d228de3cda6d7cf45\",\"name\":\"violet\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4571412769d757e8ecacdf5967ea55865839b6d95042f5fc535566d9d3533d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4571412769d757e8ecacdf5967ea55865839b6d95042f5fc535566d9d3533d0?s=96&d=mm&r=g\",\"caption\":\"violet\"},\"url\":\"https:\/\/mob25.com\/blog\/author\/nkl\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/","og_locale":"ru_RU","og_type":"article","og_title":"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439","og_description":"\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c Kittygram \u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Kittygram \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c Cat; \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b. \u041d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u0432\u044c\u044e\u0441\u0435\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u0437\u0430\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0438\u043c \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u00bb. \u041d\u0443 \u0447\u0442\u043e \u0436, \u043f\u043e\u043b\u0435\u0437\u043b\u0438. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f [&hellip;]","og_url":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/","og_site_name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438","article_published_time":"2022-06-15T21:17:11+00:00","article_modified_time":"2023-05-09T18:47:50+00:00","og_image":[{"url":"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png","type":"","width":"","height":""}],"author":"violet","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/","url":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/","name":"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439","isPartOf":{"@id":"https:\/\/mob25.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage"},"image":{"@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage"},"thumbnailUrl":"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png","datePublished":"2022-06-15T21:17:11+00:00","dateModified":"2023-05-09T18:47:50+00:00","author":{"@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/493391ea0717532d228de3cda6d7cf45"},"breadcrumb":{"@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#primaryimage","url":"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png","contentUrl":"https:\/\/mob25.com\/wp-content\/uploads\/2021\/09\/ser-1024x675.png"},{"@type":"BreadcrumbList","@id":"https:\/\/mob25.com\/blog\/serializatory-dlya-svyazannyh-modelej\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/mob25.com\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}]},{"@type":"WebSite","@id":"https:\/\/mob25.com\/blog\/#website","url":"https:\/\/mob25.com\/blog\/","name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mob25.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/493391ea0717532d228de3cda6d7cf45","name":"violet","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4571412769d757e8ecacdf5967ea55865839b6d95042f5fc535566d9d3533d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4571412769d757e8ecacdf5967ea55865839b6d95042f5fc535566d9d3533d0?s=96&d=mm&r=g","caption":"violet"},"url":"https:\/\/mob25.com\/blog\/author\/nkl\/"}]}},"_links":{"self":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts\/18711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/comments?post=18711"}],"version-history":[{"count":0,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts\/18711\/revisions"}],"wp:attachment":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/media?parent=18711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/categories?post=18711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/tags?post=18711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}