Use to_css_class for table cell column classes

This ensures that columns with spaces in the name will still
generate usable CSS class names. Refs #209
This commit is contained in:
Simon Willison 2018-04-17 18:19:21 -07:00
commit dfb87d012c
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
2 changed files with 7 additions and 7 deletions

View file

@ -20,7 +20,7 @@
{% for row in display_rows %}
<tr>
{% for cell in row %}
<td class="col-{{ cell.column|lower }}">{{ cell.value }}</td>
<td class="col-{{ cell.column|to_css_class }}">{{ cell.value }}</td>
{% endfor %}
</tr>
{% endfor %}