diff options
| author | Tim Graham <timograham@gmail.com> | 2013-05-18 12:05:35 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-05-18 12:11:29 -0400 |
| commit | 2c84f4434cd0f6e74471d5737b049c648cff538f (patch) | |
| tree | 7fe3d8cf29e8b8af0b750d6e52fc9e49558ec0e9 /docs/howto/static-files | |
| parent | 2335fdd0773d61b9c02e5d4e3cd17bfe230552d5 (diff) | |
Fixed #20284 - Added a note about DEBUG in static file docs.
Thanks wim@ for the suggestion and Nicolas NoƩ for the patch.
Diffstat (limited to 'docs/howto/static-files')
| -rw-r--r-- | docs/howto/static-files/index.txt | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/howto/static-files/index.txt b/docs/howto/static-files/index.txt index 1fdad94143..3668c5dc41 100644 --- a/docs/howto/static-files/index.txt +++ b/docs/howto/static-files/index.txt @@ -35,8 +35,20 @@ Configuring static files 4. Store your static files in a folder called ``static`` in your app. For example ``my_app/static/my_app/myimage.jpg``. -Now, if you use ``./manage.py runserver``, all static files should be served -automatically at the :setting:`STATIC_URL` and be shown correctly. +.. admonition:: Serving the files + + In addition to these configuration steps, you'll also need to actually + serve the static files. + + During development, this will be done automatically if you use + :djadmin:`runserver` and :setting:`DEBUG` is set to ``True`` (see + :func:`django.contrib.staticfiles.views.serve`). + + This method is **grossly inefficient** and probably **insecure**, + so it is **unsuitable for production**. + + See :doc:`/howto/static-files/deployment` for proper strategies to serve + static files in production environments. Your project will probably also have static assets that aren't tied to a particular app. In addition to using a ``static/`` directory inside your apps, |
