{"id":532,"date":"2021-05-18T12:00:00","date_gmt":"2021-05-18T03:00:00","guid":{"rendered":"https:\/\/www.sea2800.com\/?p=532"},"modified":"2021-08-21T07:56:50","modified_gmt":"2021-08-20T22:56:50","slug":"django%e3%82%a2%e3%83%97%e3%83%aa%e3%81%ae%e9%aa%a8%e7%b5%84%e3%81%bf%e4%bd%9c%e3%82%8a","status":"publish","type":"post","link":"https:\/\/www.sea2800.com\/?p=532","title":{"rendered":"\u697d\u3057\u3066Django\u30a2\u30d7\u30ea\u3092\u4f5c\u308bPART\uff11"},"content":{"rendered":"\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- test -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-7910153846163820\" data-ad-slot=\"9115942114\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u3068\u304d\u3001\u3069\u3046\u3057\u3066\u3082\u6700\u521d\u306e\u7acb\u3061\u4e0a\u3052\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3044\u304c\u3061\u306a\u306e\u3067\u3001css\u30d5\u30a1\u30a4\u30eb\u3084JavaScript\u30d5\u30a1\u30a4\u30eb\u3092\u8a8d\u8b58\u3055\u305b\u308b\u307e\u3067\u306e\u3084\u308a\u65b9\u3092\u30e1\u30e2\u3068\u3057\u3066\u6b8b\u3057\u3001\u7d20\u65e9\u304f\u5236\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3042\u3068\u50d5\u304c\u5b8c\u6210\u3057\u305f\u306e\u3092GitHub\u306b\u3042\u3052\u3066\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u3068\u304d\u306e\u4f5c\u696d\u3092\u697d\u3057\u305f\u3044\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69ef86613aaae\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69ef86613aaae\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sea2800.com\/?p=532\/#%E4%BD%BF%E7%94%A8%E7%92%B0%E5%A2%83\" >\u4f7f\u7528\u74b0\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sea2800.com\/?p=532\/#%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E4%BD%9C%E6%88%90\" >\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sea2800.com\/?p=532\/#%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E4%BD%9C%E6%88%90\" >\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sea2800.com\/?p=532\/#settingspy%E3%81%AE%E7%B7%A8%E9%9B%86%E3%81%A7CSS%E3%82%92%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BE%E3%81%9B%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B\" >settings.py\u306e\u7de8\u96c6\u3067CSS\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3088\u3046\u306b\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sea2800.com\/?p=532\/#Django%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%8B%E3%82%89Static%E7%94%BB%E5%83%8F%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%95%E3%81%9B%E3%82%8B\" >Django\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Static\u753b\u50cf\u3092\u8868\u793a\u3055\u305b\u308b<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BD%BF%E7%94%A8%E7%92%B0%E5%A2%83\"><\/span>\u4f7f\u7528\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4eca\u56de\u4f7f\u3046\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\" id=\"block-590fcb16-4f8f-4196-8ebd-019b0c7b086a\"><li>Django ==3.1.7<\/li><li>python ==3.7.3<\/li><li>Visual Studio Code<\/li><li>PyMySql ==0.2.7<\/li><li>MySQL == 8.1<\/li><\/ul>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fsqlite3\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u500b\u4eba\u7684\u306bmysql\u306e\u65b9\u304c\u4f7f\u3044\u3084\u3059\u3044\u3057\u3001\u3053\u306e\u30b5\u30a4\u30c8\u306e\u9aa8\u7d44\u307f\u3092\u5229\u7528\u3057\u3066\u5b9f\u969b\u306b\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u516c\u958b\u3057\u3066\u3044\u304f\u5834\u5408\u306fsqlite\uff13\u306fDjango\u516c\u5f0f\u304c\u975e\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u306e\u3067mysql\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002django3.1.7\u3067\u306fdjango2.2\u3068\u9055\u3044\u30e2\u30b8\u30e5\u30fc\u30ebsix\u304c\u53cd\u5fdc\u3057\u306a\u304b\u3063\u305f\u308a\u3001staticfile\u306e\u6307\u5b9a\u306e\u4ed5\u65b9\u304c\u7570\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>six\u304c\u53cd\u5fdc\u3057\u306a\u3044\u306e\u306f\u3001django\u304c3.0\u306b\u3059\u308b\u969b\u300c\u4eca\u6642python2 \u4f7f\u3046\u4eba\u306a\u3093\u3066\u3044\u306a\u3044\u3057python\u516c\u5f0f\u3082python\uff13\u306b\u3057\u308d\u3068\u304b\u8a00\u3063\u3066\u3044\u308b\u304b\u3089\uff12\u30683\u3092\u7e4b\u3052\u308bmodule six\u306f\u3044\u3089\u306a\u3044\u3088\u306d\uff1f\u300d\u3068\u8a00\u3063\u305f\u611f\u3058\u3067django\u304b\u3089\u6d88\u3055\u308c\u305f\u307f\u305f\u3044\u3067\u3059\u3002\u3082\u3063\u3068\u3082module six \u304c\u5fc5\u8981\u306a\u5834\u9762\u306fSNS\u30ed\u30b0\u30a4\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u3068\u304d\u306b\u8d77\u304d\u308b\u3050\u3089\u3044\u306a\u306e\u3067\u3001\u3042\u307e\u308a\u906d\u9047\u3059\u308b\u3068\u306f\u601d\u3044\u307e\u305b\u3093\u304c&#8230;<\/p>\n\n\n\n<p>\u3082\u3057\u305d\u306e\u3088\u3046\u306a\u72b6\u6cc1\u306b\u306a\u3063\u305f\u3089\u4e0b\u8a18\u306e\u30b5\u30a4\u30c8\u3067\u89e3\u6c7a\u65b9\u6cd5\u3092\u8a18\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-\u30ef\u30bf\u306e\u8a18\u9332 wp-block-embed-\u30ef\u30bf\u306e\u8a18\u9332\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"yrQlQAmISF\"><a href=\"https:\/\/www.sea2800.com\/?p=401\">gTTS\u3092\u4f7f\u304a\u3046\u3068\u3057\u305f\u3089 No module named &#8216;six&#8217;\u304c\u51fa\u305f\u306e\u3067\u76f4\u3057\u305f\u304a\u8a71<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;gTTS\u3092\u4f7f\u304a\u3046\u3068\u3057\u305f\u3089 No module named &#8216;six&#8217;\u304c\u51fa\u305f\u306e\u3067\u76f4\u3057\u305f\u304a\u8a71&#8221; &#8212; \u30a8\u30b9\u30d7\u30ec\u30c3\u30bd\u306e\u8a18\u9332\" src=\"https:\/\/www.sea2800.com\/?p=401&#038;embed=true#?secret=yrQlQAmISF\" data-secret=\"yrQlQAmISF\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E4%BD%9C%E6%88%90\"><\/span>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u307e\u305a\u597d\u304d\u306a\u3068\u3053\u308d\u306b\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066Visual Studio Code\u3067\u958b\u304d\u307e\u3059\u3002\u305d\u306e\u6b21\u306b\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089New Terminal \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u697d\u306b\u30b3\u30de\u30f3\u30c9\u5165\u529b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u9593\u3067\u30b2\u30fc\u30e0\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u6295\u7a3f\u3067\u304d\u308b\u30b5\u30a4\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\uff04 django-admin startproject \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d<\/code><\/pre>\n\n\n\n<p>\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u5165\u529b\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306a\u30d5\u30a9\u30eb\u30c0\u7fa4\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3059\u3002\u4ee5\u5f8c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\/\n    manage.py\n    mysite\/\n        __init__.py\n        settings.py\n        urls.py\n        wsgi.py<\/code><\/pre>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u3067\u3082\u4e00\u5fdc\u30b5\u30a4\u30c8\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3044\u3061\u3044\u3061\u30bf\u30fc\u30df\u30ca\u30eb\u5185\u306b\u3042\u308b\u30b4\u30df\u7bb1\u30dc\u30bf\u30f3\u3092\u62bc\u3055\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3081\u3093\u3069\u304f\u3055\u3055\u304c\u3001\u3042\u308b\u306e\u3067\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u306f\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u81ea\u8eab\u306e\u76ee\u3067\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\uff04\u3000python manage.py runserver<\/code><\/pre>\n\n\n\n<p> \u5165\u529b\u3057\u3066URL \u304c\u51fa\u3066\u304f\u308b\u306e\u3067\u30b3\u30de\u30f3\u30c9\uff08window&#8217;s\u306a\u3089\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\uff09\uff0b\u30af\u30ea\u30c3\u30af\u3067URL\u306b\u30b8\u30e3\u30f3\u30d7\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u30da\u30fc\u30b8\u306b\u30ed\u30b1\u30c3\u30c8\u306e\u7d75\u304c\u51fa\u3066\u305f\u3089\u3046\u307e\u304f\u3044\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E4%BD%9C%E6%88%90\"><\/span>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u5165\u529b\u3059\u308b\u3060\u3051\u3067\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\uff04\u3000django-admin startapp \u30a2\u30d7\u30ea\u540d<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>app_name\/\n    __init__.py\n    admin.py\n    apps.py\n    migrations\/\n        __init__.py\n    models.py\n    tests.py\n    views.py<\/code><\/pre>\n\n\n\n<p>\u3053\u3093\u306a\u611f\u3058\u306e\u30d5\u30a9\u30eb\u30c0\u7fa4\u304c\u751f\u307e\u308c\u3066\u304d\u307e\u3059\u3002\u4ee5\u5f8c\u30a2\u30d7\u30ea\u30d5\u30a9\u30eb\u30c0\u3068\u8a00\u3044\u307e\u3059\u3002\u3053\u308c\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306f\u3067\u304d\u4e0a\u304c\u308a\u3067\u3059\u3002\u3057\u304b\u3057\u4eca\u56de\u306fCSS\u7b49\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u3066\u3044\u304f\u305f\u3081\u3001\u7d30\u304b\u304f\u8a2d\u5b9a\u3092\u6c7a\u3081\u3066\u884c\u304b\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"settingspy%E3%81%AE%E7%B7%A8%E9%9B%86%E3%81%A7CSS%E3%82%92%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BE%E3%81%9B%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B\"><\/span>settings.py\u306e\u7de8\u96c6\u3067CSS\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3088\u3046\u306b\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308bsettings.py\u3092\u958b\u3044\u3066\u4e0b\u8a18\u306e\u9805\u76ee\u3092\u8ffd\u52a0\u3059\u308b\u3068\u8aad\u307f\u8fbc\u307f\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>STATICFILES_DIRS = (\n    os.path.join(BASE_DIR, \"static\"),\n)\nSTATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')\nMEDIA_URL ='\/media\/'\nMEDIA_ROOT = os.path.join(BASE_DIR,'media')<\/code><\/pre>\n\n\n\n<p>\u3064\u3044\u3067\u306b\u753b\u50cf\u3092\u6271\u3044\u305f\u3044\u3068\u601d\u3046\u306e\u3067\u3001MEDIA_URL\u3067\u753b\u50cf\u306e\u4fdd\u5b58\u5834\u6240\u3092\u6559\u3048\u3066\u3042\u3052\u3064\u3064MEDIA_ROOT\u3067\u753b\u50cf\u3092\u8a8d\u8b58\u3055\u305b\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3067html\u3067{% static  \u540d\u524d.css%}\u3068\u5165\u529b\u3059\u308b\u3068CSS\u304c\u53cd\u5fdc\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3068static\u30d5\u30a1\u30a4\u30eb\u3092\uff11\u7b87\u6240\u306b\u307e\u3068\u3081\u305f\u308a\u3001CSS\u306e\u30d5\u30a1\u30a4\u30eb\u3084JavaScript\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u308c\u308b\u4fbf\u5229\u306a\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u81ea\u5206\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30c7\u30b6\u30a4\u30f3\u306b\u3057\u305f\u3044\u306e\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u305f\u3089\u4e2d\u8eab\u306f\u5168\u6d88\u53bb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\uff04python manage.py collectstatic<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Django%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%8B%E3%82%89Static%E7%94%BB%E5%83%8F%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%95%E3%81%9B%E3%82%8B\"><\/span>Django\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Static\u753b\u50cf\u3092\u8868\u793a\u3055\u305b\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6700\u5f8c\u306bdjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u753b\u50cf\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django.contrib import admin\nfrom django.urls import path, include\nfrom django.conf import settings\nfrom django.conf.urls import url\nfrom django.conf.urls.static import static,staticfiles_urlpatterns\nurlpatterns = &#91;\n    path('admin\/', admin.site.urls),\n    path('',include('app_name.url')),\n\n\n]\n\nurlpatterns += staticfiles_urlpatterns()\nurlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_URL)\n\n\n<\/code><\/pre>\n\n\n\n<p>\u6b21\u56de\u306fmysql\u3068User\u306e\u9aa8\u7d44\u307f\u3092\u4f5c\u3063\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- test -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-7910153846163820\" data-ad-slot=\"9115942114\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u3068\u304d\u3001\u3069\u3046\u3057\u3066\u3082\u6700\u521d\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,8],"tags":[],"class_list":["post-532","post","type-post","status-publish","format-standard","hentry","category-django","category-python"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=532"}],"version-history":[{"count":14,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/532\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/532\/revisions\/718"}],"wp:attachment":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}