{"id":408,"date":"2021-04-24T11:39:21","date_gmt":"2021-04-24T02:39:21","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=408"},"modified":"2021-04-24T22:32:41","modified_gmt":"2021-04-24T13:32:41","slug":"django-%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=408","title":{"rendered":"Django \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/h2>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306b\u3082\u30e9\u30d9\u30eb\u4ed8\u3051\u3092\u3057\u3066\u6574\u7406\u3057\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306e\u30eb\u30fc\u30eb\u3092\u4f5c\u308b\u3053\u3068\u3092\u30c7\u30fc\u30bf\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u3068\u3044\u3044\u307e\u3059\u3002<br>Django\u304c\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002<br>EC\u30b5\u30a4\u30c8\u306a\u3069\u3067\u306f\u5546\u54c1\u3084\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u306e\u30c7\u30fc\u30bf\uff08\u60c5\u5831\uff09\u3092\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u308c\u3092\u7c21\u5358\u306b\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3044\u3046\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3063\u305f\u65b9\u304c\u4fbf\u5229\u306a\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p>django\u306b\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u7c21\u5358\u306b\u4f7f\u3046\u305f\u3081\u306e\u6a5f\u80fd\u304c\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u3002<br>\u5177\u4f53\u7684\u306b\u306f\u3001models.py\u30d5\u30a1\u30a4\u30eb\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u95a2\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3060\u3051\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u3059\u3002<br>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067sqlite3\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3046\u8a2d\u5b9a\u304c\u3055\u308c\u3066\u3044\u307e\u3059<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306esetting.py\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<br>DATABASES\u306b\u304a\u3044\u3066sqlite3\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"mysite\/setting.py\"><code># Database\n# https:\/\/docs.djangoproject.com\/en\/3.1\/ref\/settings\/#databases\n\nDATABASES = {\n    &#39;default&#39;: {\n        &#39;ENGINE&#39;: &#39;django.db.backends.sqlite3&#39;,\n        &#39;NAME&#39;: BASE_DIR \/ &#39;db.sqlite3&#39;,\n    }\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30c7\u30fc\u30bf\u306b\u3082\u30e9\u30d9\u30eb\u4ed8\u3051\u3092\u3057\u3066\u6574\u7406\u3057\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306e\u30eb\u30fc\u30eb\u3092\u4f5c\u308b\u3053\u3068\u3092\u30c7\u30fc\u30bf\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u3068\u3044\u3044\u307e\u3059\u3002Django\u304c\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002EC\u30b5\u30a4\u30c8\u306a\u3069\u3067\u306f\u5546\u54c1\u3084\u30e6<\/p>\n","protected":false},"author":1,"featured_media":412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[8,3],"tags":[],"class_list":["post-408","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-django","category-python"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=408"}],"version-history":[{"count":3,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions"}],"predecessor-version":[{"id":449,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions\/449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/412"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}