{% with blog_post.tags.all as tags %} {% if tags %} {% endif %} {% endwith %}