djangosnippets.org: Latest snippets tagged with 'Counter'https://djangosnippets.org/tags/counter_1/2015-06-19T10:12:27.396198-05:00Template tag to render collections.Counter as an html table
2015-06-19T10:12:27.396198-05:00asfaltboyhttps://djangosnippets.org/snippets/10502/<p>Render a given instance of collections.Counter into a 2 column html table.</p>
<p>Optionally accepts <code>column_title</code> keyword argument which sets the table
key column header.</p>
<p>Usage:</p>
<pre><code>{% counter_table event_counter column_title='event type' %}
</code></pre>
<p>The above will render the a table from the <code>event_counter</code> variable with the first (key) column set to "event …</p>
Freely redistributable