{"id":385,"date":"2021-04-24T10:43:58","date_gmt":"2021-04-24T01:43:58","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=385"},"modified":"2022-04-23T17:23:09","modified_gmt":"2022-04-23T08:23:09","slug":"django-%e4%bb%ae%e6%83%b3%e7%92%b0%e5%a2%83%e6%a7%8b%e7%af%89","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=385","title":{"rendered":"Django \u958b\u767a\u74b0\u5883\u69cb\u7bc9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Mac\u306e\u5834\u5408<\/h3>\n\n\n\n<p>Ctrl+Space\u30ad\u30fc\u3067\u691c\u7d22\u7a93\u3092\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u3053\u306e\u691c\u7d22\u7a93\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u3068\u5165\u529b\u3057\u3001\u8d77\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Windows\u306e\u5834\u5408<\/h3>\n\n\n\n<p>\u691c\u7d22\u7a93\u306bpowershell\u3068\u5165\u529b\u3057\u3001\u7acb\u3061\u4e0a\u3052\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">python\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3001\u5b9f\u884c<\/h4>\n\n\n\n<p>Python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3059\u308b\u524d\u306bPython\u304c\u65e2\u306b\u30d1\u30bd\u30b3\u30f3\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br>\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python --version<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3001\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3001\u30d6\u30e9\u30f3\u30af\u753b\u9762\u304c\u51fa\u305f\u5834\u5408\u3084\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u306fPython\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Mac\u306e\u5834\u5408<\/h3>\n\n\n\n<p>\u307e\u305a\u306fMac\u3067Python\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>Mac\u306e\u5834\u5408Homebrew\u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3063\u3066python\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002python\u306a\u3069\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3092\u7c21\u5358\u306b\u884c\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304cHomebrew\u3092\u4f7f\u3046\u7406\u7531\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3057\u3066Homebrew\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u306fXCode\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u307e\u305a\u306fXCode\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br>XCode\u306fMac\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u7528\u3044\u3089\u308c\u308b\u7d71\u5408\u958b\u767a\u74b0\u5883\u306a\u306e\u3067\u3059\u304c\u4eca\u56de\u306fHomebrew\u3092\u4f7f\u3046\u305f\u3081\u306bXCode\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066XCode\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>xcode-select -install<\/code><\/pre><\/div>\n\n\n\n<p>XCode\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089Homebrew\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>ruby -e &quot;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&quot;<\/code><\/pre><\/div>\n\n\n\n<p>Homebrew\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>brew doctor\nYour system is ready to brew<\/code><\/pre><\/div>\n\n\n\n<p>\u5b9f\u884c\u5f8c\u4e0a\u8a18\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3057\u3066\u3044\u307e\u3059\u3002<br>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067Python3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>brew install python3 <\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Windows\u306e\u5834\u5408<\/h3>\n\n\n\n<p>Windows\u306e\u5834\u5408\u3001Powershell\u3092\u4f7f\u308f\u305a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<br>\u691c\u7d22\u7a93\u306b\u300c\u30de\u30a4\u30af\u30ed\u30bd\u30d5\u30c8\u30b9\u30c8\u30a2\u300d\u3068\u5165\u529b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>Microsoft Store\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u8868\u793a\u3055\u308c\u308bMicrosoft Store\u306e\u753b\u9762\u306e\u53f3\u4e0a\u306e\u691c\u7d22\u7a93\u306bpython\u3068\u5165\u529b\u3057\u307e\u3059\u3002<br>\u305d\u3046\u3059\u308b\u3068\u691c\u7d22\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u305d\u306e\u4e2d\u3067\u8868\u793a\u3055\u308c\u308bPython3\u306e\u4e2d\u304b\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u30921\u3064\u9078\u3073\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u300c\u5165\u624b\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068Python\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089PowerShell\u3092\u7acb\u3061\u4e0a\u3052\u3066\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br>\u30bf\u30fc\u30df\u30ca\u30eb\u3067pthon3 &#8211;version\u3068\u5165\u529b\u3001\u5b9f\u884c\u3057\u3066Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Django\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>Python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u6b21\u306bDjango\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br>Django\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306fPython\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u3042\u308bpip\u3092\u4f7f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<br>pip\u306fPython3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306b\u5408\u308f\u305b\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u65b0\u3057\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067Django\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip3 install django<\/code><\/pre><\/div>\n\n\n\n<p>Django\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip freeze<\/code><\/pre><\/div>\n\n\n\n<p>pip freeze\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067pip\u304c\u7ba1\u7406\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u3053\u306e\u4e2d\u306bDjango\u3068\u3044\u3046\u6587\u5b57\u304c\u5165\u3063\u3066\u3044\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7121\u4e8b\u306b\u5b8c\u4e86\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Visual Studio Code\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u304a\u4f1d\u3048\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u4f7f\u3046\u3053\u3068\u3067\u52b9\u7387\u7684\u306b\u5b9f\u88c5\u3092\u9032\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\nhttp:\/\/www.agile-software.site\/2021\/04\/24\/vs-code%e3%81%ae%e8%a8%ad%e5%ae%9a\/\n\n\n\n<p><\/p>\n\n\n\n<p>python\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4eee\u60f3\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br>Python\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u5b9a\u671f\u7684\u306b\u66f4\u65b0\u3055\u308c\u308b\u305f\u3081Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3057\u3066\u3044\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u4e92\u63db\u6027\u304c\u7121\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<br>\u305d\u306e\u305f\u3081Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306b\u4eee\u60f3\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3002<\/p>\n\n\n\n<p id=\"block-54fc4a2b-922a-4198-b7da-ca114cf94879\">\u4eee\u60f3\u74b0\u5883\u4f5c\u6210<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python3 -m venv myvenv<\/code><\/pre><\/div>\n\n\n\n<p id=\"block-da62356b-99bb-4876-b096-ff6fd824166e\">\u4eee\u60f3\u74b0\u5883\u306e\u5b9f\u884c<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>source myvenv\/bin\/activate<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-274ec180-6413-4ab7-a061-97ea04187dcf\">pip\u30b3\u30de\u30f3\u30c9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>(myvenv) ~$ pip3 install --upgrade pip setuptools<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-f8ddf2c7-171f-47d9-b1b7-aeb7706b533c\">\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p id=\"block-989edf7f-0ca1-408e-b95d-a6eee9f193e7\">\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306brequirements.text\u3092\u6e96\u5099\u3057\u307e\u3059\u3002<br>text\u306e\u5834\u6240\u306fDJANGO-BLOG\u76f4\u4e0b\u306b\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Django~=3.1.4\ndjango-widget-tweaks~=1.4.8\ndjango-allauth~=0.41.0<\/code><\/pre><\/div>\n\n\n\n<p id=\"block-98865ae5-434b-42b3-9c3f-c2059c7e037e\"><br>requirements.text\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u4eee\u60f3\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>(myvenv) ~$ pip3 install -r requirements.txt<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d Mac\u306e\u5834\u5408 Ctrl+Space\u30ad\u30fc\u3067\u691c\u7d22\u7a93\u3092\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u691c\u7d22\u7a93\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u3068\u5165\u529b\u3057\u3001\u8d77\u52d5\u3057\u307e\u3057\u3087\u3046\u3002 Windows\u306e\u5834\u5408 \u691c\u7d22\u7a93\u306bpowershell\u3068\u5165\u529b\u3057\u3001\u7acb\u3061\u4e0a\u3052\u307e\u3059<\/p>\n","protected":false},"author":1,"featured_media":386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-django"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/385","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=385"}],"version-history":[{"count":3,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":1812,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions\/1812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/386"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}