title: In jinja2, how to include the same template twice but pass in different variables
body: <p>In jinja2, I am trying to dynamically create a html document using the template more than once. 
  My python script looks like this:</p>
  
  <pre><code># In my python script
  env = Environment()
  env.loader = FileSystemLoader('.')
  base_template = env.get_template('base_template.html')
  
  # each has the actual content and its associated template 
  content1 = ("Hello World", 'content_template.html') 
  content2 = ("Foo bar", 'content_template.html')
  
  
  html_to_present = [content1[1], content2[1]]
  
  # and render. I know this is wrong 
  # as I am not passing the actual content, 
  # but this is the part I am struggling with. More below
  base_template.render(include_these=html_to_present, ).encode("utf-8"))
  </code></pre>
  
  <p>And my base template looks like this:</p>
  
  <pre><code>#################
  # base_template.html
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      {% for include_this in include_these %}
      {% include include_this %}
      {% endfor %}    
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and <code>content_template.html</code> looks like this</p>
  
  <pre><code># content_template.html
  &lt;div&gt;
      {{ content }}
  &lt;/div&gt;
  </code></pre>
  
  <p>Now my question is how do you dynamically set <code>content</code> variable in the <code>content_template.html</code> based on the value associated with it?</p>