Fixed #20910 -- Added a "snippet" sphinx directive to allow prefixing a filename.

Thanks Marc Tamlyn for the suggestion.
This commit is contained in:
M Nasimul Haque 2013-09-23 23:23:47 +01:00 committed by Tim Graham
parent e077224f4a
commit d07d6ae116
10 changed files with 403 additions and 124 deletions

View file

@ -56,7 +56,8 @@ reference the path for templates.
Put the following code in that stylesheet (``polls/static/polls/style.css``):
.. code-block:: css
.. snippet:: css
:filename: polls/static/polls/style.css
li a {
color: green;
@ -64,7 +65,8 @@ Put the following code in that stylesheet (``polls/static/polls/style.css``):
Next, add the following at the top of ``polls/templates/polls/index.html``:
.. code-block:: html+django
.. snippet:: html+django
:filename: polls/templates/polls/index.html
{% load staticfiles %}
@ -88,7 +90,8 @@ called ``background.gif``. In other words, put your image in
Then, add to your stylesheet (``polls/static/polls/style.css``):
.. code-block:: css
.. snippet:: css
:filename: polls/static/polls/style.css
body {
background: white url("images/background.gif") no-repeat right bottom;