summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-10-29 11:55:32 -0400
committerTim Graham <timograham@gmail.com>2018-10-29 11:55:32 -0400
commit7f2b27e95c754e7761a559c9564ff8943753ac32 (patch)
tree3715900a10d63a360f27d85220a91d50777910f1 /docs
parentd8e03fdeb9613b996e52bb5e7f083f7284005600 (diff)
Fixed code highlighting in docs/ref/contrib/staticfiles.txt.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/staticfiles.txt40
1 files changed, 25 insertions, 15 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index c17518d2b4..ef85c7959f 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -84,8 +84,6 @@ respectively. For example::
Then set the :setting:`STATICFILES_STORAGE` setting to
``'path.to.MyStaticFilesStorage'``.
-.. highlight:: console
-
Some commonly used options are:
.. django-admin-option:: --noinput, --no-input
@@ -125,7 +123,9 @@ Some commonly used options are:
Don't ignore the common private glob-style patterns ``'CVS'``, ``'.*'``
and ``'*~'``.
-For a full list of options, refer to the commands own help by running::
+For a full list of options, refer to the commands own help by running:
+
+.. console::
$ python manage.py collectstatic --help
@@ -155,7 +155,9 @@ class, override the ``ignore_patterns`` attribute of this class and replace
Searches for one or more relative paths with the enabled finders.
-For example::
+For example:
+
+.. console::
$ python manage.py findstatic css/base.css admin/js/core.js
Found 'css/base.css' here:
@@ -167,7 +169,9 @@ For example::
.. django-admin-option:: findstatic --first
By default, all matching locations are found. To only return the first match
-for each relative path, use the ``--first`` option::
+for each relative path, use the ``--first`` option:
+
+.. console::
$ python manage.py findstatic css/base.css --first
Found 'css/base.css' here:
@@ -177,14 +181,18 @@ This is a debugging aid; it'll show you exactly which static file will be
collected for a given path.
By setting the ``--verbosity`` flag to 0, you can suppress the extra output and
-just get the path names::
+just get the path names:
+
+.. console::
$ python manage.py findstatic css/base.css --verbosity 0
/home/special.polls.com/core/static/css/base.css
/home/polls.com/core/static/css/base.css
On the other hand, by setting the ``--verbosity`` flag to 2, you can get all
-the directories which were searched::
+the directories which were searched:
+
+.. console::
$ python manage.py findstatic css/base.css --verbosity 2
Found 'css/base.css' here:
@@ -215,9 +223,11 @@ Use the ``--nostatic`` option to disable serving of static files with the
only available if the :doc:`staticfiles </ref/contrib/staticfiles>` app is
in your project's :setting:`INSTALLED_APPS` setting.
-Example usage::
+Example usage:
+
+.. console::
- django-admin runserver --nostatic
+ $ django-admin runserver --nostatic
.. django-admin-option:: --insecure
@@ -231,9 +241,11 @@ in your project's :setting:`INSTALLED_APPS` setting.
``--insecure`` doesn't work with :class:`~.storage.ManifestStaticFilesStorage`.
-Example usage::
+Example usage:
- django-admin runserver --insecure
+.. console::
+
+ $ django-admin runserver --insecure
.. _staticfiles-storages:
@@ -289,7 +301,7 @@ by default covers the `@import`_ rule and `url()`_ statement of `Cascading
Style Sheets`_. For example, the ``'css/styles.css'`` file with the
content
-.. code-block:: css+django
+.. code-block:: css
@import url("../admin/css/base.css");
@@ -298,7 +310,7 @@ method of the ``ManifestStaticFilesStorage`` storage backend, ultimately
saving a ``'css/styles.55e7cbb9ba48.css'`` file with the following
content:
-.. code-block:: css+django
+.. code-block:: css
@import url("../admin/css/base.27e20196a850.css");
@@ -436,8 +448,6 @@ developing locally. Thus, the ``staticfiles`` app ships with a
**quick and dirty helper view** that you can use to serve files locally in
development.
-.. highlight:: python
-
.. function:: views.serve(request, path)
This view function serves static files in development.