Commit 09d2c286 authored by Michal Čihař's avatar Michal Čihař

Document proper /static serving

Issue #605
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent e35461e7
...@@ -367,12 +367,6 @@ options: ...@@ -367,12 +367,6 @@ options:
.. seealso:: `SERVER_EMAIL documentation`_ .. seealso:: `SERVER_EMAIL documentation`_
Prepare static files
--------------------
Django needs to collect it's static files to a single directory. To do so, execute
:samp:`./manage.py collectstatic --noinput --link`.
Filling up the database Filling up the database
----------------------- -----------------------
...@@ -678,14 +672,17 @@ For testing purposes, you can use Django builtin web server: ...@@ -678,14 +672,17 @@ For testing purposes, you can use Django builtin web server:
Serving static files Serving static files
++++++++++++++++++++ ++++++++++++++++++++
Django needs to collect it's static files to a single directory. To do so, execute
:samp:`./manage.py collectstatic --noinput --link`.
It is recommended to serve static files directly by your web server, you should It is recommended to serve static files directly by your web server, you should
use that for following paths: use that for following paths:
:file:`/media` :file:`/media`
Serves :file:`media` directory from Weblate. Serves :file:`media` directory from Weblate.
:file:`/static/admin` :file:`/static`
Serves media files for Django admin interface (eg. Serves static files for Weblate and admin interface
:file:`/usr/share/pyshared/django/contrib/admin/media/`). (from defined by ``STATIC_ROOT``, see :ref:`static-files`).
Additionally you should setup rewrite rule to serve :file:`media/favicon.ico` Additionally you should setup rewrite rule to serve :file:`media/favicon.ico`
as :file:`favicon.ico`. as :file:`favicon.ico`.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment