Fixed #21221 -- Made form Media and static template tag use staticfiles if installed.

This commit is contained in:
Johannes Hoppe 2015-11-07 12:24:38 +01:00 committed by Tim Graham
parent 6be9589eb3
commit cf546e11ac
34 changed files with 145 additions and 144 deletions

View file

@ -68,13 +68,11 @@ Next, add the following at the top of ``polls/templates/polls/index.html``:
.. snippet:: html+django
:filename: polls/templates/polls/index.html
{% load staticfiles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' %}" />
``{% load staticfiles %}`` loads the :ttag:`{% static %} <staticfiles-static>`
template tag from the ``staticfiles`` template library. The ``{% static %}``
template tag generates the absolute URL of the static file.
The ``{% static %}`` template tag generates the absolute URL of static files.
That's all you need to do for development. Reload
``http://localhost:8000/polls/`` and you should see that the question links are