Loading docs/ref/settings.txt +2 −4 Original line number Diff line number Diff line Loading @@ -2628,9 +2628,7 @@ tuples, e.g.:: ("downloads", "/opt/webfiles/stats"), ) Example: Assuming you have :setting:`STATIC_URL` set ``'/static/'``, the For example, assuming you have :setting:`STATIC_URL` set to ``'/static/'``, the :djadmin:`collectstatic` management command would collect the "stats" files in a ``'downloads'`` subdirectory of :setting:`STATIC_ROOT`. Loading @@ -2640,7 +2638,7 @@ This would allow you to refer to the local file .. code-block:: html+django <a href="{{ STATIC_URL }}downloads/polls_20101022.tar.gz"> <a href="{% static "downloads/polls_20101022.tar.gz" %}"> .. setting:: STATICFILES_STORAGE Loading docs/ref/templates/builtins.txt +3 −4 Original line number Diff line number Diff line Loading @@ -2501,10 +2501,9 @@ get_static_prefix .. highlight:: html+django If you're not using :class:`~django.template.RequestContext`, or if you need more control over exactly where and how :setting:`STATIC_URL` is injected into the template, you can use the :ttag:`get_static_prefix` template tag instead:: You should prefer the :ttag:`static` template tag, but if you need more control over exactly where and how :setting:`STATIC_URL` is injected into the template, you can use the :ttag:`get_static_prefix` template tag:: {% load static %} <img src="{% get_static_prefix %}images/hi.jpg" alt="Hi!" /> Loading Loading
docs/ref/settings.txt +2 −4 Original line number Diff line number Diff line Loading @@ -2628,9 +2628,7 @@ tuples, e.g.:: ("downloads", "/opt/webfiles/stats"), ) Example: Assuming you have :setting:`STATIC_URL` set ``'/static/'``, the For example, assuming you have :setting:`STATIC_URL` set to ``'/static/'``, the :djadmin:`collectstatic` management command would collect the "stats" files in a ``'downloads'`` subdirectory of :setting:`STATIC_ROOT`. Loading @@ -2640,7 +2638,7 @@ This would allow you to refer to the local file .. code-block:: html+django <a href="{{ STATIC_URL }}downloads/polls_20101022.tar.gz"> <a href="{% static "downloads/polls_20101022.tar.gz" %}"> .. setting:: STATICFILES_STORAGE Loading
docs/ref/templates/builtins.txt +3 −4 Original line number Diff line number Diff line Loading @@ -2501,10 +2501,9 @@ get_static_prefix .. highlight:: html+django If you're not using :class:`~django.template.RequestContext`, or if you need more control over exactly where and how :setting:`STATIC_URL` is injected into the template, you can use the :ttag:`get_static_prefix` template tag instead:: You should prefer the :ttag:`static` template tag, but if you need more control over exactly where and how :setting:`STATIC_URL` is injected into the template, you can use the :ttag:`get_static_prefix` template tag:: {% load static %} <img src="{% get_static_prefix %}images/hi.jpg" alt="Hi!" /> Loading