title: Flask partial view for a list of items
body: <p>If on most pages in the website I have a list of categories or recent articles that are loaded from the DB - how can I avoid duplicating code using flask and jinja2 ? </p>
  
  <p>The way it is now, I have an html file which I include like :</p>
  
  <pre><code>{% include '/root/latest_articles.html' %}
  </code></pre>
  
  <p>And then every view has to pass the parameter (list of articles) to the template. I'd like to avoid this.</p>
  
  <p>What's the best way to achieve this in Flask?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The "additional template context" would work .. I could export a function that loads the data from the DB and access it in the "latest_articles.html" template.</p>
  
  <p>Is there another way ?</p>