{"title":"静的ファイル (画像、JavaScript、CSS など) の管理","version":"2.0","locale":"ja","docname":"howto/static-files/index","url":"/ja/2.0/howto/static-files/","canonical":"https://djangodocs.dev/ja/2.0/howto/static-files/","summary":"ウェブサイトではふつう、画像や JavaScript、CSS などの追加のファイルを配信する必要があります。Django では、こうしたファイルのことを「静的ファイル (static files)」と呼んでいます。静的ファイルの管理を簡単にするために、Django は django.contrib.staticfiles…","html":"<h1>静的ファイル (画像、JavaScript、CSS など) の管理<a class=\"heading-anchor\" href=\"#managing-static-files-e-g-images-javascript-css\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>ウェブサイトではふつう、画像や JavaScript、CSS などの追加のファイルを配信する必要があります。Django では、こうしたファイルのことを「静的ファイル (static files)」と呼んでいます。静的ファイルの管理を簡単にするために、Django は <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a> を提供しています。</p>\n<p>このページでは、こうした静的ファイルの配信の仕方について説明します。</p>\n<section id=\"configuring-static-files\">\n<h2>静的ファイルの設定<a class=\"heading-anchor\" href=\"#configuring-static-files\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ol class=\"arabic\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code> が設定ファイルの <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> に含まれていることを確認してください。</p></li>\n<li><p>設定ファイルの中で、<a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a> を設定します。たとえば、次のようになります。</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">STATIC_URL</span> <span class=\"o\">=</span> <span class=\"s1\">&#39;/static/&#39;</span>\n</code></pre></div>\n</li>\n<li><p>In your templates, use the <a class=\"reference internal\" href=\"/ja/2.0/ref/templates/builtins/#std-templatetag-static\"><code class=\"xref std std-ttag docutils literal notranslate\"><span class=\"pre\">static</span></code></a> template tag to build the URL for\nthe given relative path using the configured <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATICFILES_STORAGE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_STORAGE</span></code></a>.</p>\n<div class=\"code-block\" data-language=\"html+django\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Django template</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Django template code\"><code><span class=\"cp\">{%</span> <span class=\"k\">load</span> <span class=\"nv\">static</span> <span class=\"cp\">%}</span>\n<span class=\"p\">&lt;</span><span class=\"nt\">img</span> <span class=\"na\">src</span><span class=\"o\">=</span><span class=\"s\">&quot;</span><span class=\"cp\">{%</span> <span class=\"k\">static</span> <span class=\"s2\">&quot;my_app/example.jpg&quot;</span> <span class=\"cp\">%}</span><span class=\"s\">&quot;</span> <span class=\"na\">alt</span><span class=\"o\">=</span><span class=\"s\">&quot;My image&quot;</span><span class=\"p\">/&gt;</span>\n</code></pre></div>\n</li>\n<li><p>アプリケーション内に <code class=\"docutils literal notranslate\"><span class=\"pre\">static``というフォルダを作って静的ファイルを保存してください。例えば、``my_app/static/my_app/example.jpg</span></code> となります。</p></li>\n</ol>\n<aside class=\"admonition-serving-the-files admonition\">\n<p class=\"admonition-title\">ファイルを配信する</p>\n<p>これらの設定の手順に加えて、実際に静的ファイルを配信する必要があります。</p>\n<p>開発中に <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a> を使用する場合には、<a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> を <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> に設定して <a class=\"reference internal\" href=\"/ja/2.0/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> を実行すれば、自動的に設定が行われます。(詳しくは、<a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#django.contrib.staticfiles.views.serve\" title=\"django.contrib.staticfiles.views.serve\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.views.serve()</span></code></a> を参照)</p>\n<p>ただし、この方法は <strong>極めて非効率</strong> であり、<strong>セキュリティ上の問題がある</strong> 可能性が高いため、<strong>実際の製品では使うべきではありません</strong>。</p>\n<p>製品環境中で静的ファイルを配信するための適切な戦略については、<a class=\"reference internal\" href=\"/ja/2.0/howto/static-files/deployment/\"><span class=\"doc\">静的ファイルのデプロイ</span></a> を読んでください。</p>\n</aside>\n<p>プロジェクトには、特定のアプリケーションに紐付けられていない 静的な assets があることがあります。その場合には、アプリケーション内の <code class=\"docutils literal notranslate\"><span class=\"pre\">static/</span></code> ディレクトリの他に、設定ファイルでディレクトリのリスト (<a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_DIRS</span></code></a>) を定義して、Django が静的ファイルを検索できるようにすることができます。たとえば、次のように設定します。</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">STATICFILES_DIRS</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"n\">os</span><span class=\"o\">.</span><span class=\"n\">path</span><span class=\"o\">.</span><span class=\"n\">join</span><span class=\"p\">(</span><span class=\"n\">BASE_DIR</span><span class=\"p\">,</span> <span class=\"s2\">&quot;static&quot;</span><span class=\"p\">),</span>\n    <span class=\"s1\">&#39;/var/www/static/&#39;</span><span class=\"p\">,</span>\n<span class=\"p\">]</span>\n</code></pre></div>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">staticfiles</span></code> がファイルを探索する方法について詳しくは、 <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATICFILES_FINDERS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATICFILES_FINDERS</span></code></a> のドキュメントを参照してください。</p>\n<aside class=\"admonition-static-file-namespacing admonition\">\n<p class=\"admonition-title\">静的ファイルの名前空間</p>\n<p>この時点で <code class=\"docutils literal notranslate\"><span class=\"pre\">my_app/static/</span></code> 内に (他に <code class=\"docutils literal notranslate\"><span class=\"pre\">my_app</span></code> のサブディレクトリを作る事なく) 直接静的ファイルを配置できるようになる <em>はず</em> ですが、実はこれはあまり良くない考えです。 Django は探索して最初に名前が一致した静的ファイルを利用し、もし <em>異なった</em> アプリケーションで同一の名前の静的ファイルが存在した場合、 Django はそれらを区別できません。 Django に正しいパスを指定する必要がありますが、それを行うもっとも簡単な方法は <em>名前空間化</em> する事です。つまり、静的ファイルをアプリケーションごとに命名された <em>別個の</em> ディレクトリ内に配置する事で行えます。</p>\n</aside>\n</section>\n<section id=\"serving-static-files-during-development\">\n<span id=\"serving-static-files-in-development\"></span><h2>開発時の静的ファイルの取扱い<a class=\"heading-anchor\" href=\"#serving-static-files-during-development\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>上で述べたたように <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a> を利用する場合、 <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">DEBUG</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> であれば <a class=\"reference internal\" href=\"/ja/2.0/ref/django-admin/#django-admin-runserver\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">runserver</span></code></a> は自動的にこの処理を行います。もし <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> 内に <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code> が存在しない場合は、手動で <a class=\"reference internal\" href=\"/ja/2.0/ref/views/#django.views.static.serve\" title=\"django.views.static.serve\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.views.static.serve()</span></code></a> ビューを用いて静的ファイルを取り扱わなければなりません。</p>\n<p>その機能はプロダクション環境で利用するのに適していません! 一般的なデプロイ方法に関しては <a class=\"reference internal\" href=\"/ja/2.0/howto/static-files/deployment/\"><span class=\"doc\">静的ファイルのデプロイ</span></a> を参照ください。</p>\n<p>例えば、 <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_URL</span></code></a> が <code class=\"docutils literal notranslate\"><span class=\"pre\">/static/</span></code> として定義される場合、その設定は urls.py に以下のスニペットを追加する事で行えます:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.conf</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">settings</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.conf.urls.static</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">static</span>\n\n<span class=\"n\">urlpatterns</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"c1\"># ... the rest of your URLconf goes here ...</span>\n<span class=\"p\">]</span> <span class=\"o\">+</span> <span class=\"n\">static</span><span class=\"p\">(</span><span class=\"n\">settings</span><span class=\"o\">.</span><span class=\"n\">STATIC_URL</span><span class=\"p\">,</span> <span class=\"n\">document_root</span><span class=\"o\">=</span><span class=\"n\">settings</span><span class=\"o\">.</span><span class=\"n\">STATIC_ROOT</span><span class=\"p\">)</span>\n</code></pre></div>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>このヘルパー関数はデバッグモードでプレフィックスが URL (例えば <code class=\"docutils literal notranslate\"><span class=\"pre\">http://static.example.com/</span></code>) でなくローカルのパス (例えば <code class=\"docutils literal notranslate\"><span class=\"pre\">/static/</span></code>) である場合にのみ利用できます。</p>\n<p>またこのヘルパー関数は <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> のフォルダのみを利用します; <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a> のように静的ファイルの探索は行いません。</p>\n</aside>\n</section>\n<section id=\"serving-files-uploaded-by-a-user-during-development\">\n<span id=\"serving-uploaded-files-in-development\"></span><h2>ユーザーによりアップロードされるファイルの開発時の取扱い<a class=\"heading-anchor\" href=\"#serving-files-uploaded-by-a-user-during-development\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>開発中は、ユーザーによってアップロードされたメディアファイルを <a class=\"reference internal\" href=\"/ja/2.0/ref/views/#django.views.static.serve\" title=\"django.views.static.serve\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">django.views.static.serve()</span></code></a> ビューを利用している <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-MEDIA_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_ROOT</span></code></a> から利用できます。</p>\n<p>その機能はプロダクション環境で利用するのに適していません! 一般的なデプロイ方法に関しては <a class=\"reference internal\" href=\"/ja/2.0/howto/static-files/deployment/\"><span class=\"doc\">静的ファイルのデプロイ</span></a> を参照ください。</p>\n<p>例えば、 <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MEDIA_URL</span></code></a> を <code class=\"docutils literal notranslate\"><span class=\"pre\">/media/</span></code> として設定する場合、urls.py に次の記述を追記することでその設定を行えます:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.conf</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">settings</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.conf.urls.static</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">static</span>\n\n<span class=\"n\">urlpatterns</span> <span class=\"o\">=</span> <span class=\"p\">[</span>\n    <span class=\"c1\"># ... the rest of your URLconf goes here ...</span>\n<span class=\"p\">]</span> <span class=\"o\">+</span> <span class=\"n\">static</span><span class=\"p\">(</span><span class=\"n\">settings</span><span class=\"o\">.</span><span class=\"n\">MEDIA_URL</span><span class=\"p\">,</span> <span class=\"n\">document_root</span><span class=\"o\">=</span><span class=\"n\">settings</span><span class=\"o\">.</span><span class=\"n\">MEDIA_ROOT</span><span class=\"p\">)</span>\n</code></pre></div>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>このヘルパー関数はデバッグモードでプレフィックスが URL (例えば <code class=\"docutils literal notranslate\"><span class=\"pre\">http://media.example.com/</span></code>) ではなくローカルパス (例えば <code class=\"docutils literal notranslate\"><span class=\"pre\">/media/</span></code>) である場合にのみ利用できます。</p>\n</aside>\n</section>\n<section id=\"testing\">\n<span id=\"staticfiles-testing-support\"></span><h2>テスト<a class=\"heading-anchor\" href=\"#testing\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When running tests that use actual HTTP requests instead of the built-in\ntesting client (i.e. when using the built-in <a class=\"reference internal\" href=\"/ja/2.0/topics/testing/tools/#django.test.LiveServerTestCase\" title=\"django.test.LiveServerTestCase\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">LiveServerTestCase</span></code></a>) the static assets need to be served along\nthe rest of the content so the test environment reproduces the real one as\nfaithfully as possible, but <code class=\"docutils literal notranslate\"><span class=\"pre\">LiveServerTestCase</span></code> has only very basic static\nfile-serving functionality: It doesn't know about the finders feature of the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">staticfiles</span></code> application and assumes the static content has already been\ncollected under <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a>.</p>\n<p>Because of this, <code class=\"docutils literal notranslate\"><span class=\"pre\">staticfiles</span></code> ships its own\n<a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#django.contrib.staticfiles.testing.StaticLiveServerTestCase\" title=\"django.contrib.staticfiles.testing.StaticLiveServerTestCase\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles.testing.StaticLiveServerTestCase</span></code></a>, a subclass\nof the built-in one that has the ability to transparently serve all the assets\nduring execution of these tests in a way very similar to what we get at\ndevelopment time with <code class=\"docutils literal notranslate\"><span class=\"pre\">DEBUG</span> <span class=\"pre\">=</span> <span class=\"pre\">True</span></code>, i.e. without having to collect them\nusing <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> first.</p>\n</section>\n<section id=\"deployment\">\n<h2>デプロイ<a class=\"heading-anchor\" href=\"#deployment\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a> provides a convenience management command\nfor gathering static files in a single directory so you can serve them easily.</p>\n<ol class=\"arabic\">\n<li><p>Set the <a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> setting to the directory from which you'd\nlike to serve these files, for example:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"n\">STATIC_ROOT</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;/var/www/example.com/static/&quot;</span>\n</code></pre></div>\n</li>\n<li><p>Run the <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">collectstatic</span></code></a> management command:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>$ python manage.py collectstatic\n</code></pre></div>\n<p>This will copy all files from your static folders into the\n<a class=\"reference internal\" href=\"/ja/2.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">STATIC_ROOT</span></code></a> directory.</p>\n</li>\n<li><p>Use a web server of your choice to serve the\nfiles. <a class=\"reference internal\" href=\"/ja/2.0/howto/static-files/deployment/\"><span class=\"doc\">静的ファイルのデプロイ</span></a> covers some common deployment\nstrategies for static files.</p></li>\n</ol>\n</section>\n<section id=\"learn-more\">\n<h2>さらに学ぶ<a class=\"heading-anchor\" href=\"#learn-more\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>This document has covered the basics and some common usage patterns. For\ncomplete details on all the settings, commands, template tags, and other pieces\nincluded in <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.staticfiles</span></code></a>, see <a class=\"reference internal\" href=\"/ja/2.0/ref/contrib/staticfiles/\"><span class=\"doc\">the staticfiles\nreference</span></a>.</p>\n</section>","rootId":"managing-static-files-e-g-images-javascript-css","toc":[{"title":"静的ファイルの設定","anchor":"configuring-static-files","children":[]},{"title":"開発時の静的ファイルの取扱い","anchor":"serving-static-files-during-development","children":[]},{"title":"ユーザーによりアップロードされるファイルの開発時の取扱い","anchor":"serving-files-uploaded-by-a-user-during-development","children":[]},{"title":"テスト","anchor":"testing","children":[]},{"title":"デプロイ","anchor":"deployment","children":[]},{"title":"さらに学ぶ","anchor":"learn-more","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"「How-to」ガイド","url":"/ja/2.0/howto/"}],"prev":{"docname":"howto/overriding-templates","title":"Overriding templates","url":"/ja/2.0/howto/overriding-templates/"},"next":{"docname":"howto/static-files/deployment","title":"静的ファイルのデプロイ","url":"/ja/2.0/howto/static-files/deployment/"},"formats":{"html":"/ja/2.0/howto/static-files/","markdown":"/ja/2.0/howto/static-files.md","json":"/ja/2.0/howto/static-files.json"},"source":"https://github.com/django/django/blob/stable/2.0.x/docs/howto/static-files/index.txt","official":"https://docs.djangoproject.com/ja/2.0/howto/static-files/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}