title: How to extend django template from python string
body: <p>I have a string that looks like</p>
  
  <pre><code>string '''
      &lt;html&gt;
          &lt;head&gt;
              {% block head %}{% endblock %}
              ... other stuff ...
          &lt;/head&gt;
          &lt;body&gt;
              {% block body %}{% endblock %}
             ... other stuff ...
          &lt;/body&gt;
      &lt;/html&gt;
  '''
  </code></pre>
  
  <p>I would like the following django template to inherit from the above string:</p>
  
  <pre><code>{% block head %}
      ... other stuff ...
  {% endblock %}
  
  {% block body %}
      &lt;h1&gt;Other stuff&lt;/h1&gt;
  {% endblock %}
  </code></pre>
  
  <p>Since the string is not in a file a can't just specify it's filename to the template rendering engine.  Any ideas?</p>