{"id":6050,"date":"2018-12-04T07:01:26","date_gmt":"2018-12-03T22:01:26","guid":{"rendered":"http:\/\/blog.jansnap.com\/?p=6050"},"modified":"2021-12-15T01:46:00","modified_gmt":"2021-12-14T16:46:00","slug":"django%e3%81%a7%e3%83%97%e3%83%ad%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e5%86%85%e3%81%a7%e5%85%b1%e9%80%9a%e3%81%ae%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/blog.jansnap.com\/?p=6050","title":{"rendered":"Django\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067\u5171\u901a\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u3046"},"content":{"rendered":"\n<h2><span class=\"ez-toc-section\" id=\"%E8%83%8C%E6%99%AF\"><\/span>\n\u80cc\u666f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>Django\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306b\u8907\u6570\u306e\u30a2\u30d7\u30ea\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u30b5\u30a4\u30c8\u5168\u4f53\u3067\u30b9\u30bf\u30a4\u30eb\u3092\u7d71\u4e00\u3057\u305f\u3044\u3002<\/li>\n<\/ul>\n\n<h2><span class=\"ez-toc-section\" id=\"%E7%92%B0%E5%A2%83\"><\/span>\n\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>Python 3.7.0 (3.7.1\u304c\u51fa\u3066\u3044\u3066\u30013.7.2\u3082\u8fd1\u3005\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u306e\u3067\u3001\u5165\u308c\u66ff\u3048\u4e88\u5b9a\u3067\u3059)<\/li>\n<li>Django 2.1.3<\/li>\n<\/ul>\n\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%84%E3%82%8A%E6%96%B9\"><\/span>\n\u3084\u308a\u65b9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u76f4\u4e0b\u306btemplates\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210<\/li>\n<li>\u4e0a\u8a18\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u306b\u3001sitebase.html\u3092\u4f5c\u6210(\u30b5\u30a4\u30c8\u5168\u4f53\u3067\u30e6\u30cb\u30fc\u30af\u306a\u540d\u524d\u306b\u3059\u308b)<\/li>\n<li>settings.py\u3092\u4fee\u6b63\u3057\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u63a2\u3059\u30d5\u30a9\u30eb\u30c0\u306b\u4e0a\u8a18\u3092\u8ffd\u52a0<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"text\" class=\"language-text\">TEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')],      # \u3053\u3053\u3092\u5909\u66f4\n        'APP_DIRS': True,\n        'OPTIONS': {\n            (\u7565)\n        },\n    },\n]<\/code><\/pre>\n\n\n\n<ul>\n<li><p>\u4e0a\u8a18\u306esitebase.html\u306bHTML\u3092\u8a18\u8ff0<\/p><\/li>\n<li><p>\u30a2\u30d7\u30ea\u5074\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3001\u4e0a\u8a18\u3092\u547c\u3073\u51fa\u3059\u3002<\/p><\/li>\n<\/ul>\n\n<p><code>{% extends 'sitebase.html' %}<\/code><\/p>\n\n<h2><span class=\"ez-toc-section\" id=\"%E6%84%9F%E6%83%B3\"><\/span>\n\u611f\u60f3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<p>Django\u3067\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u3092\u3069\u3053\u306b\u7f6e\u3044\u3066settings.py\u3092\u3069\u3046\u66f8\u304f\u306e\u304c\u30d9\u30b9\u30c8\u304b\u3001\u307e\u3060\u60a9\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<ul>\n<li>Django\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306b\u8907\u6570\u306e\u30a2\u30d7\u30ea\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u30b5\u30a4\u30c8\u5168\u4f53\u3067\u30b9\u30bf\u30a4\u30eb\u3092\u7d71\u4e00\u3057\u305f\u3044\u3002<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4209,4071],"tags":[4208,4066],"class_list":["post-6050","post","type-post","status-publish","format-standard","hentry","category-django21","category-python3","tag-django21","tag-python3"],"_links":{"self":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts\/6050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6050"}],"version-history":[{"count":0,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts\/6050\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}