{"id":3721,"date":"2011-11-21T03:03:12","date_gmt":"2011-11-20T18:03:12","guid":{"rendered":"http:\/\/mimumimu.net\/blog\/2011\/11\/21\/python-django-%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82-%e3%81%9d%e3%81%ae%ef%bc%91%ef%bc%8e%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9a%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b\/"},"modified":"2012-04-21T18:23:14","modified_gmt":"2012-04-21T09:23:14","slug":"python-django-%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82-%e3%81%9d%e3%81%ae%ef%bc%91%ef%bc%8e%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9a%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/mimumimu.net\/blog\/2011\/11\/21\/python-django-%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82-%e3%81%9d%e3%81%ae%ef%bc%91%ef%bc%8e%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9a%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b\/","title":{"rendered":"Python + Django \u3057\u3066\u307f\u305f\u3002 \u305d\u306e\uff11\uff0e\u3068\u308a\u3042\u3048\u305a\u52d5\u304b\u3057\u3066\u307f\u308b\u3002"},"content":{"rendered":"<p><a href=\"http:\/\/mimumimu.net\/blog\/wp-content\/uploads\/2011\/11\/image20.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/mimumimu.net\/blog\/wp-content\/uploads\/2011\/11\/image_thumb20.png\" width=\"399\" height=\"577\" \/><\/a><\/p>\n<p>\u3069\u3046\u3082<strong><u>\u307f\u3080\u3089\u3093<\/u><\/strong>\u3067\u3059\u3002    <br \/>\u308d\u30fc\u305f\u3059\u306b\u300c\u307f\u3080\u3089\u3093\u300d\u3068\u8a00\u308f\u308c\u305f\u306e\u3067\u3001 Web \u3084\u308b\u3068\u304d\u306f\u300c\u307f\u3080\u3089\u3093\u300d\u3068\u3057\u3088\u3046\u304b\u306a\u3001\u3044\u3042\u3044\u3042\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u666e\u6bb5\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u3084\u308b\u4eba\u304c\u3001   <br \/>\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3084\u3063\u3066\u307f\u308b\u30b3\u30fc\u30ca\u30fc\u7b2c\u4f55\u5f3e\u3067\u3059\u3088\u3063\u3068\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u9591\u8a71\u4f11\u984c<\/p>\n<p>&#160;<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u65e9\u901f\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<h3>\uff11\uff0e\u4e0b\u6e96\u5099\uff1a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:c65c2e47-ec16-4770-99c8-f01143113c66\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: python;\">$ easy_install django<\/pre>\n<\/div>\n<p>\u3053\u308c\u3067\u304a\u3063\u3051\u30fc\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f Apache + mod_wsgi \u3067\u884c\u3044\u307e\u3057\u305f\u304c\u3001<br \/>\u3082\u3057\u305d\u306e\u8fba\u306e\u74b0\u5883\u304c\u305d\u308d\u3063\u3066\u306a\u304f\u3068\u3082\u3001\u5358\u4f53\u3067\u3082\u5b9f\u884c\u53ef\u80fd\u306a\u306e\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>&#160;<\/p>\n<h3>\uff12\uff0e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210<\/h3>\n<p>\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3002<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:b3135207-6168-4e60-b934-f1d68e30a79b\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: python;\">$ django-admin startproject testproject<\/pre>\n<\/div>\n<p>&#160;<\/p>\n<h3>\uff13\uff0e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u4f5c\u6210<\/h3>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:5d892bdb-c9f5-47ea-8755-6eac390aafe8\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: python;\">$ cd testproject\n$ .\/manage.py startapp testapp<\/pre>\n<\/div>\n<p>\uff12\u3067\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff08\u4e0a\u8a18\u4f8b\u3060\u3068 \u300ctestproject\u300d\uff09\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001<br \/>startapp \u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<h3>\uff14. (Apache \u306e\u5834\u5408\u306e\u307f) mod_wsgi \u3067\u52d5\u304f\u3088\u3046\u306b\u3059\u308b\u3002<\/h3>\n<p><a title=\"django\u3092mod_wsgi\u3084cgi\u3067\u4f7f\u3046\u305f\u3081\u306epython\u30b9\u30af\u30ea\u30d7\u30c8 - \u30e9\u30b7\u30a6\u30e9\" href=\"http:\/\/d.hatena.ne.jp\/bellbind\/20081222\/1229955876\">django\u3092mod_wsgi\u3084cgi\u3067\u4f7f\u3046\u305f\u3081\u306epython\u30b9\u30af\u30ea\u30d7\u30c8 \u2013 \u30e9\u30b7\u30a6\u30e9<\/a><\/p>\n<p>\u3053\u3053\u3092\u53c2\u8003\u306b\u3002<\/p>\n<p>\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3001 index.wsgi \u3068\u3057\u3066\u4fdd\u5b58\u3057\u3066\u3001<br \/>.htaccess \u3067\u898b\u306b\u884c\u304b\u305b\u308b\u3002<\/p>\n<p>\u307e\u305f\u3053\u306e\u3068\u304d\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u884c\u3046\u3002<\/p>\n<p>\uff11\uff0eapps = os.path.dirname(__file__) \u306e __file__ \u3092 settings.py \u306e\u3042\u308b\u30d1\u30b9\u306b\u66f8\u304d\u63db\u3048\u308b\u3002<br \/>\uff12\uff0e\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001 os.environ[\u201cDJANGO_SETTINGS_MODULE\u201d]&#160; \u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3002<\/p>\n<p>&#160;<\/p>\n<h3>\uff14\uff0e(\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3 \u306e\u5834\u5408\u306e\u307f)&#160; \u30b5\u30fc\u30d0\u3092\u7acb\u3061\u4e0a\u3052\u308b\u3002<\/h3>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:1f116a48-ccab-4934-a16e-09d6effcc058\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: python;\">$ python manage.py runserver localhost:8080<\/pre>\n<\/div>\n<p>&#160;<\/p>\n<h3>\uff15.\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3002<\/h3>\n<p><a href=\"http:\/\/mimumimu.net\/blog\/wp-content\/uploads\/2011\/11\/image21.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/mimumimu.net\/blog\/wp-content\/uploads\/2011\/11\/image_thumb21.png\" width=\"596\" height=\"383\" \/><\/a><\/p>\n<p>It worked! \u3068\u51fa\u308c\u3070\u6210\u529f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u307f\u3080\u3089\u3093\u3067\u3059\u3002 \u308d\u30fc\u305f\u3059\u306b\u300c\u307f\u3080\u3089\u3093\u300d\u3068\u8a00\u308f\u308c\u305f\u306e\u3067\u3001 Web \u3084\u308b\u3068\u304d\u306f\u300c\u307f\u3080\u3089\u3093\u300d\u3068\u3057\u3088\u3046\u304b\u306a\u3001\u3044\u3042\u3044\u3042\u3002 \u3068\u308a\u3042\u3048\u305a\u3001\u666e\u6bb5\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u3084\u308b\u4eba\u304c\u3001 \u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,14,7],"tags":[118,584],"class_list":["post-3721","post","type-post","status-publish","format-standard","hentry","category-python","category-web","category-dev","tag-django","tag-python"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/3721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/comments?post=3721"}],"version-history":[{"count":0,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/3721\/revisions"}],"wp:attachment":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/media?parent=3721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/categories?post=3721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/tags?post=3721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}