Skip to content

Commit f841ff4

Browse files
committed
Add templatetafs.py and user the title filter for list titles
Signed-off-by: Nir Izraeli <nirizr@gmail.com>
1 parent 124ce5f commit f841ff4

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

server/collab/templates/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<thead>
1010
<tr>
1111
{% for header in headers %}
12-
<th>{{ header }}</th>
12+
<th>{{ header|title }}</th>
1313
{% endfor %}
1414
<th></th>
1515
</tr>

server/templatetags.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django import template
2+
3+
register = template.Library()
4+
5+
6+
@register.filter
7+
def lookup(d, key):
8+
if key not in d:
9+
return None
10+
return d[key]

0 commit comments

Comments
 (0)