{"id":38642,"date":"2024-11-01T19:08:32","date_gmt":"2024-11-01T19:08:32","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38642"},"modified":"2024-11-26T06:43:44","modified_gmt":"2024-11-26T06:43:44","slug":"django-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%ed%95%84%eb%93%9c-%ec%9c%a0%ed%98%95-%eb%b0%8f-%ea%b4%80%ea%b3%84-%ec%84%a4%ec%a0%95-onetoone-foreignkey-manytomany","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38642\/","title":{"rendered":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)"},"content":{"rendered":"<p><body><\/p>\n<p>Django\ub294 \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ub41c \uac15\ub825\ud55c \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ubaa8\ub378\ub9c1\ud558\ub294 \ub9e4\uc6b0 \uc720\uc5f0\ud55c \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. Django\uc758 \ubaa8\ub378 \ud074\ub798\uc2a4\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ud14c\uc774\ube14\uc744 \uc815\uc758\ud558\uace0, \uac01 \ud544\ub4dc\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc5f4\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Django \ubaa8\ub378\uc5d0\uc11c \ub2e4\uc591\ud55c \ud544\ub4dc \uc720\ud615\uacfc \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. Django \ubaa8\ub378 \uc18c\uac1c<\/h2>\n<p>Django\uc758 \ubaa8\ub378\uc740 <code>django.db.models.Model<\/code>\ub97c \uc0c1\uc18d\ubc1b\uc544 \uc815\uc758\ub429\ub2c8\ub2e4. \ubaa8\ub378 \uc124\uacc4\ub97c \ud1b5\ud574 \uc6b0\ub9ac\uac00 \uc5b4\ub5a4 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc5b4\ub5a4 \uad00\uacc4\ub97c \uac00\uc9c8\uc9c0\ub97c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ubaa8\ub378 \ud544\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ub2e4\uc591\ud55c \ub370\uc774\ud130 \uc720\ud615\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4:<\/p>\n<ul>\n<li>CharField<\/li>\n<li>TextField<\/li>\n<li>IntegerField<\/li>\n<li>DateTimeField<\/li>\n<li>EmailField<\/li>\n<li>FileField, ImageField \ub4f1<\/li>\n<\/ul>\n<h2>2. \ud544\ub4dc \uc720\ud615<\/h2>\n<p>\uac01 \ud544\ub4dc\ub294 \ud2b9\uc815\ud55c \uc18d\uc131\uc744 \uac00\uc9c0\uba70, \uc774\ub7ec\ud55c \uc18d\uc131\uc744 \ud1b5\ud574 \ub370\uc774\ud130\uc758 \uc720\ud6a8\uc131\uacfc \uc81c\uc57d\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \uc77c\ubc18\uc801\uc73c\ub85c \uc0ac\uc6a9\ub418\ub294 \ud544\ub4dc \uc720\ud615\ub4e4\uc785\ub2c8\ub2e4.<\/p>\n<h3>2.1 CharField<\/h3>\n<p>\ubb38\uc790\uc5f4 \ud544\ub4dc\ub85c, \uc8fc\ub85c \uc9e7\uc740 \ud14d\uc2a4\ud2b8\ub97c \uc800\uc7a5\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. <code>max_length<\/code> \uc18d\uc131\uc774 \ud544\uc218\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>from django.db import models\n\nclass Author(models.Model):\n    name = models.CharField(max_length=100)\n<\/code><\/pre>\n<h3>2.2 TextField<\/h3>\n<p>\uae34 \ud14d\uc2a4\ud2b8\ub97c \uc800\uc7a5\ud560 \uc218 \uc788\ub294 \ud544\ub4dc\uc785\ub2c8\ub2e4. <code>max_length<\/code> \uc18d\uc131\uc774 \ud544\uc694\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>class BlogPost(models.Model):\n    title = models.CharField(max_length=100)\n    content = models.TextField()\n<\/code><\/pre>\n<h3>2.3 IntegerField<\/h3>\n<p>\uc815\uc218\ub97c \uc800\uc7a5\ud558\uae30 \uc704\ud55c \ud544\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>class Comment(models.Model):\n    post = models.ForeignKey(BlogPost, on_delete=models.CASCADE)\n    likes = models.IntegerField(default=0)\n<\/code><\/pre>\n<h2>3. \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uad00\uacc4 \uc124\uc815<\/h2>\n<p>Django\uc5d0\uc11c\ub294 \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud560 \uc218 \uc788\ub294 \uc5ec\ub7ec \uac00\uc9c0 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc8fc\ub85c \uc0ac\uc6a9\ub418\ub294 \uad00\uacc4\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 OneToOneField<\/h3>\n<p>OneToOneField\ub294 \uc11c\ub85c \ub2e4\ub978 \ub450 \ubaa8\ub378 \uac04\uc758 1:1 \uad00\uacc4\ub97c \uc124\uc815\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790\uac00 \ud504\ub85c\ud544\uc744 \uac00\uc9c0\ub294 \uacbd\uc6b0\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>class UserProfile(models.Model):\n    user = models.OneToOneField(Author, on_delete=models.CASCADE)\n    bio = models.TextField()\n    avatar = models.ImageField(upload_to='avatars\/')\n<\/code><\/pre>\n<h3>3.2 ForeignKey<\/h3>\n<p>ForeignKey\ub294 1:N \uad00\uacc4\ub97c \uc124\uc815\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \ud55c \uba85\uc758 \uc800\uc790\uac00 \uc5ec\ub7ec \uac1c\uc758 \ud3ec\uc2a4\ud2b8\ub97c \uac00\uc9c4\ub2e4\uace0 \uac00\uc815\ud574\ubd05\uc2dc\ub2e4.<\/p>\n<pre><code>class Author(models.Model):\n    name = models.CharField(max_length=100)\n\nclass BlogPost(models.Model):\n    author = models.ForeignKey(Author, on_delete=models.CASCADE)\n    title = models.CharField(max_length=100)\n    content = models.TextField()\n<\/code><\/pre>\n<h3>3.3 ManyToManyField<\/h3>\n<p>ManyToManyField\ub294 N:M \uad00\uacc4\ub97c \uc124\uc815\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc5ec\ub7ec \uac1c\uc758 \ud0dc\uadf8\uac00 \uc5ec\ub7ec \uac1c\uc758 \ube14\ub85c\uadf8 \ud3ec\uc2a4\ud2b8\uc5d0 \uc5f0\uad00\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>class Tag(models.Model):\n    name = models.CharField(max_length=30)\n\nclass BlogPost(models.Model):\n    title = models.CharField(max_length=100)\n    tags = models.ManyToManyField(Tag)\n<\/code><\/pre>\n<h2>4. \uc2e4\uc2b5: \ube14\ub85c\uadf8 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 \ubaa8\ub378 \uc124\uacc4<\/h2>\n<p>\uc774\uc81c \uc2e4\uc2b5\uc744 \ud1b5\ud574 \uc704\uc758 \uac1c\ub150\uc744 \uc885\ud569\uc801\uc73c\ub85c \uc774\ud574\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uac04\ub2e8\ud55c \ube14\ub85c\uadf8 \uac8c\uc2dc\ubb3c\uacfc \uad00\ub828\ub41c \uc5ec\ub7ec \ubaa8\ub378\uc744 \uc124\uacc4\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>class Author(models.Model):\n    name = models.CharField(max_length=100)\n\nclass Tag(models.Model):\n    name = models.CharField(max_length=30)\n\nclass BlogPost(models.Model):\n    title = models.CharField(max_length=100)\n    content = models.TextField()\n    author = models.ForeignKey(Author, on_delete=models.CASCADE)\n    tags = models.ManyToManyField(Tag)\n    created_at = models.DateTimeField(auto_now_add=True)\n<\/code><\/pre>\n<h2>5. \ub9c8\uc774\uadf8\ub808\uc774\uc158<\/h2>\n<p>\ubaa8\ub378\uc744 \uc815\uc758\ud55c \ud6c4\uc5d0\ub294 \ub9c8\uc774\uadf8\ub808\uc774\uc158\uc744 \ud1b5\ud574 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \ubc18\uc601\ud574\uc57c \ud569\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 \ub9c8\uc774\uadf8\ub808\uc774\uc158\uc744 \uc0dd\uc131\ud558\uace0 \uc2e4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>$ python manage.py makemigrations\n$ python manage.py migrate\n<\/code><\/pre>\n<h2>6. Django Admin\uc744 \ud1b5\ud55c \ubaa8\ub378 \uad00\ub9ac<\/h2>\n<p>Django Admin\uc744 \uc0ac\uc6a9\ud558\uba74 \ubaa8\ub378\uc744 \uc27d\uac8c \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Admin\uc5d0 \ubaa8\ub378\uc744 \ub4f1\ub85d\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>from django.contrib import admin\nfrom .models import Author, Tag, BlogPost\n\nadmin.site.register(Author)\nadmin.site.register(Tag)\nadmin.site.register(BlogPost)\n<\/code><\/pre>\n<h2>7. \uacb0\ub860<\/h2>\n<p>\uc774\uc640 \uac19\uc774 Django\uc5d0\uc11c\ub294 \ub2e4\uc591\ud55c \ud544\ub4dc \uc720\ud615\uacfc \uad00\uacc4\ub97c \uc124\uc815\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubaa8\ub378\ub9c1 \uc2dc \uc720\uc5f0\uc131\uacfc \uac15\ub825\ud568\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\ub97c \ud1b5\ud574 Django \ubaa8\ub378\uc758 \uc124\uacc4\uc5d0 \ub300\ud55c \uae4a\uc774 \uc788\ub294 \uc774\ud574\ub97c \ud588\uae38 \ubc14\ub77c\uba70, \uc790\uc2e0\ub9cc\uc758 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac1c\ubc1c\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub418\uc5c8\uc73c\uba74 \ud569\ub2c8\ub2e4.<\/p>\n<p>\ub354 \ub9ce\uc740 \uc815\ubcf4\ub97c \uc6d0\ud558\uc2dc\uba74 Django \uacf5\uc2dd \ubb38\uc11c\ub97c \ucc38\uc870\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Django\ub294 \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ub41c \uac15\ub825\ud55c \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ubaa8\ub378\ub9c1\ud558\ub294 \ub9e4\uc6b0 \uc720\uc5f0\ud55c \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. Django\uc758 \ubaa8\ub378 \ud074\ub798\uc2a4\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ud14c\uc774\ube14\uc744 \uc815\uc758\ud558\uace0, \uac01 \ud544\ub4dc\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc5f4\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Django \ubaa8\ub378\uc5d0\uc11c \ub2e4\uc591\ud55c \ud544\ub4dc \uc720\ud615\uacfc \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Django \ubaa8\ub378 \uc18c\uac1c Django\uc758 \ubaa8\ub378\uc740 django.db.models.Model\ub97c \uc0c1\uc18d\ubc1b\uc544 \uc815\uc758\ub429\ub2c8\ub2e4. \ubaa8\ub378 \uc124\uacc4\ub97c \ud1b5\ud574 \uc6b0\ub9ac\uac00 \uc5b4\ub5a4 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc5b4\ub5a4 \uad00\uacc4\ub97c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38642\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[185],"tags":[],"class_list":["post-38642","post","type-post","status-publish","format-standard","hentry","category-django"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/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:\/\/atmokpo.com\/w\/38642\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Django\ub294 \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ub41c \uac15\ub825\ud55c \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ubaa8\ub378\ub9c1\ud558\ub294 \ub9e4\uc6b0 \uc720\uc5f0\ud55c \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. Django\uc758 \ubaa8\ub378 \ud074\ub798\uc2a4\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ud14c\uc774\ube14\uc744 \uc815\uc758\ud558\uace0, \uac01 \ud544\ub4dc\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc5f4\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Django \ubaa8\ub378\uc5d0\uc11c \ub2e4\uc591\ud55c \ud544\ub4dc \uc720\ud615\uacfc \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Django \ubaa8\ub378 \uc18c\uac1c Django\uc758 \ubaa8\ub378\uc740 django.db.models.Model\ub97c \uc0c1\uc18d\ubc1b\uc544 \uc815\uc758\ub429\ub2c8\ub2e4. \ubaa8\ub378 \uc124\uacc4\ub97c \ud1b5\ud574 \uc6b0\ub9ac\uac00 \uc5b4\ub5a4 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc5b4\ub5a4 \uad00\uacc4\ub97c &hellip; \ub354 \ubcf4\uae30 &quot;DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38642\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T19:08:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:43:44+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)\",\"datePublished\":\"2024-11-01T19:08:32+00:00\",\"dateModified\":\"2024-11-26T06:43:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/\"},\"wordCount\":37,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"DJango\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38642\/\",\"name\":\"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T19:08:32+00:00\",\"dateModified\":\"2024-11-26T06:43:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38642\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38642\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","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:\/\/atmokpo.com\/w\/38642\/","og_locale":"ko_KR","og_type":"article","og_title":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Django\ub294 \ud30c\uc774\uc36c\uc73c\ub85c \uc791\uc131\ub41c \uac15\ub825\ud55c \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ubaa8\ub378\ub9c1\ud558\ub294 \ub9e4\uc6b0 \uc720\uc5f0\ud55c \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. Django\uc758 \ubaa8\ub378 \ud074\ub798\uc2a4\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \ud14c\uc774\ube14\uc744 \uc815\uc758\ud558\uace0, \uac01 \ud544\ub4dc\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc5f4\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Django \ubaa8\ub378\uc5d0\uc11c \ub2e4\uc591\ud55c \ud544\ub4dc \uc720\ud615\uacfc \ub370\uc774\ud130 \uac04\uc758 \uad00\uacc4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Django \ubaa8\ub378 \uc18c\uac1c Django\uc758 \ubaa8\ub378\uc740 django.db.models.Model\ub97c \uc0c1\uc18d\ubc1b\uc544 \uc815\uc758\ub429\ub2c8\ub2e4. \ubaa8\ub378 \uc124\uacc4\ub97c \ud1b5\ud574 \uc6b0\ub9ac\uac00 \uc5b4\ub5a4 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uc5b4\ub5a4 \uad00\uacc4\ub97c &hellip; \ub354 \ubcf4\uae30 \"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)\"","og_url":"https:\/\/atmokpo.com\/w\/38642\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T19:08:32+00:00","article_modified_time":"2024-11-26T06:43:44+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/38642\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38642\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)","datePublished":"2024-11-01T19:08:32+00:00","dateModified":"2024-11-26T06:43:44+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38642\/"},"wordCount":37,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["DJango\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38642\/","url":"https:\/\/atmokpo.com\/w\/38642\/","name":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T19:08:32+00:00","dateModified":"2024-11-26T06:43:44+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38642\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38642\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38642\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"DJango \uc11c\ubc84\uac1c\ubc1c, \ud544\ub4dc \uc720\ud615 \ubc0f \uad00\uacc4 \uc124\uc815 (OneToOne, ForeignKey, ManyToMany)"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=38642"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38642\/revisions"}],"predecessor-version":[{"id":38643,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38642\/revisions\/38643"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}