{% extends "layout.html" %} {% block body %}

Blog {% if mode == 'index' %}Index{% else %}Post {{ post_id }}{% endif %}

How about going to the index.

{% endblock %}