Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.X] Updated static file example in overview to use static templat…

…e tag, refs #19675.

Thanks jezdez for the note.

Backport of 9e959e8 from master
  • Loading branch information...
commit da8c7890824664e0219988ce4c41c103fceb575d 1 parent ad69293
@timgraham timgraham authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 docs/intro/overview.txt
View
5 docs/intro/overview.txt
@@ -271,17 +271,18 @@ Finally, Django uses the concept of "template inheritance": That's what the
following blocks." In short, that lets you dramatically cut down on redundancy
in templates: each template has to define only what's unique to that template.
-Here's what the "base.html" template, including the use of :doc:`static files
+Here's what the "base.html" template, including the use of :doc:`static files
</howto/static-files>`, might look like:
.. code-block:: html+django
+ {% load static %}
<html>
<head>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
- <img src="{{ STATIC_URL }}images/sitelogo.png" alt="Logo" />
+ <img src="{% static "images/sitelogo.png" %}" alt="Logo" />
{% block content %}{% endblock %}
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.