title: How to make a reusable template in Django?
body: <p>What is the Django way of creating a reusable template?</p>
  
  <p><strong>Example:</strong> Suppose a lot of my pages contain a "Latest News" box and following the DRY principle, I would like to define it once and reuse it in the other pages. How would I do this with Django (or <a href="http://jinja.pocoo.org/docs/">Jinja2</a>) templates?</p>
  
  <p>Reading through <a href="https://docs.djangoproject.com/en/1.3/topics/templates/">Django's Template Documentation</a> I get the impression that Django templates offer "top-down" inheritance where the sub-template <em>itself</em> determines in which super-template it is going to be embedded:</p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>&lt;!-- Super-template (not valid, for illustration): --&gt;
  &lt;html&gt;
    &lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;{% block content %}{% endblock %}&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  
  
  <pre class="lang-html prettyprint-override"><code>&lt;!-- Sub-template: --&gt;
  {% extends "base.html" %}
  {% block content %}
  &lt;div class="latest-news"&gt;News&lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>So what is the technique to reuse a block (a sub-template) in <em>several</em> places?</p>