title: django templates: include and extends
body: <p>I would like to provide the same content inside 2 different base files. </p>
  
  <p>So I'm trying to do this:</p>
  
  <p>page1.html:</p>
  
  <pre><code>{% extends "base1.html" %}
  {% include "commondata.html" %}
  </code></pre>
  
  <p>page2.html:</p>
  
  <pre><code>{% extends "base2.html" %} 
  {% include "commondata.html" %}
  </code></pre>
  
  <p>The problem is that I can't seem to use both extends and include.  Is there some way to do that?  And if not, how can I accomplish the above?</p>
  
  <p>commondata.html overrides a block that is specified in both base1.html and base2.html</p>
  
  <p>The purpose of this is to provide the same page in both pdf and html format, where the formatting is slightly different.  The above question though simplifies what I'm trying to do so if I can get an answer to that it will solve my problem.</p>