title: Macros in django templates
body: <p>In jinja I can create macros and call it in my template like this:</p>
  
  <pre><code>{% macro create_list(some_list) %}
  &lt;ul&gt;
      {% for item in some_list %}
      &lt;li&gt;{{ item }}&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  {% endmacro %}
  
  HTML code....
  
  {{ create_list(list1) }}
  {{ create_list(list2) }}
  {{ create_list(list3) }}
  </code></pre>
  
  <p>I read in django docs that django templates hasn't macro tag. I'm interested in the best way to do something like this in django templates.</p>