Use none function instead of default filter
authorDaniel Gustafsson <daniel@yesql.se>
Mon, 27 Aug 2018 08:36:12 +0000 (10:36 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Mon, 27 Aug 2018 08:36:12 +0000 (10:36 +0200)
The default filter is a Django templatr construction, and broke
the Jinja template. Use the "none" function in Jinja instead to
fix the template.

template.jinja/confreg/sessionlist.html

index ac809990c1300dccbb592f69ae22fa69e78fd2ad..41c42bada7a47e27bdc62accddf6470cc680c082 100644 (file)
@@ -11,7 +11,7 @@ You can find the full conference information at the
 </p>
 
 {%for track,sessionlist in sessions|groupby_sort('track', 'sortkey')%}
-<h2>{{track|default:'General'}}</h2>
+<h2>{%if track is not none%}{{track}}{%else%}General{%endif%}</h2>
 <ul>
 {%for session in sessionlist %}
  <li><a href="session/{{session.id}}-{{session.title|slugify}}/">{{session.title}}</a> ({{session.speaker_list}})</li>