{% for value,title in level_types %} {% set checked = course.level == value ? 'checked="checked"' : '' %} {% endfor %}