{% extends "til_base.html" %} {% set tils = sql(""" select * from til where topics LIKE :topic_pattern order by created_utc desc """, {"topic_pattern": '%' + topic + '%'}, database="tils") %} {% block title %}TILs on {{ topic }}{% endblock %} {% block body %} {% if not tils %} {{ raise_404("No TILs found") }} {% endif %}

TILs on {{ topic }}

{% for til in tils %}

{{ til.title }} - {{ til.created[:10] }}

{{ first_paragraph(til["html"]).replace("

", " …

")|safe }} {% for topic in til.topics.split(',') %} {{ topic }} {% endfor %} {% endfor %} {% endblock %}