mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #20910 -- Added a "snippet" sphinx directive to allow prefixing a filename.
Thanks Marc Tamlyn for the suggestion.
This commit is contained in:
parent
e077224f4a
commit
d07d6ae116
10 changed files with 403 additions and 124 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue