Skip to content

Commit 6436f32

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

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

server/collab/templates/list.html

+1-1
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

+10
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)