DRY for rendering same header table for different content
You might try building a slightly more complex datastructure to be passed in.  If you built a list like:

violations = [ ("Resolved", resolved_violations), 
               ("Open", unresolved_violations) ]


Then you could write a template like:

{% for vtype, vlist in violations %}
    {% if vlist %}
&lt;h3&gt;{{ vtype }} Violations&lt;/h3&gt;
&lt;table class="table table-striped table-bordered table-condensed"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
        &lt;th class="text-center"&gt;#&lt;/th&gt;
        &lt;th class="text-center"&gt;IDENTIFIER&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
&lt;tbody&gt;
        {% for violation in vlist %}
    &lt;tr&gt;
        &lt;td class="text-center"&gt;{{ forloop.counter }}&lt;/td&gt;
        &lt;td class="text-center"&gt;
            &lt;a href='#'&gt;{{ violation.identifier }}&lt;/a&gt;&lt;/td&gt;
     &lt;/tr&gt;
        {% endfor %}
&lt;/tbody&gt;
&lt;/table&gt;
    {% endif %}
{% endfor %}